microsoft / BotFramework-WebChat
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 680 units with 8,613 lines of code in units (41.3% of code).
    • 1 very complex units (107 lines of code)
    • 3 complex units (352 lines of code)
    • 12 medium complex units (582 lines of code)
    • 48 simple units (1,543 lines of code)
    • 616 very simple units (6,029 lines of code)
1% | 4% | 6% | 17% | 69%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
ts2% | 2% | 4% | 20% | 69%
js0% | 6% | 8% | 13% | 72%
tsx0% | 0% | 10% | 28% | 60%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
packages/api8% | 9% | 6% | 16% | 59%
packages/directlinespeech0% | 23% | 10% | 6% | 58%
packages/component0% | 1% | 6% | 17% | 74%
packages/embed0% | 0% | 23% | 31% | 45%
packages/support0% | 0% | 19% | 7% | 73%
packages/core0% | 0% | 3% | 16% | 80%
packages/bundle0% | 0% | 0% | 32% | 67%
packages/playground0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export default function normalizeLanguage()
in packages/api/src/utils/normalizeLanguage.ts
107 58 1
export default async function create()
in packages/directlinespeech/src/createAdapters.js
181 48 8
export default function normalizeStyleOptions()
in packages/api/src/normalizeStyleOptions.ts
123 31 3
export default function navigableEvent()
in packages/component/src/Utils/TypeFocusSink/navigableEvent.js
48 28 1
export default function createCoreMiddleware()
in packages/component/src/Middleware/Activity/createCoreMiddleware.tsx
48 23 0
fromUser ? localize()
in packages/component/src/Activity/CarouselFilmStrip.js
35 19 1
export default async function playCognitiveServicesStream()
in packages/directlinespeech/src/playCognitiveServicesStream.js
83 18 3
fromUser ? localize()
in packages/component/src/Activity/StackedLayout.tsx
18 17 1
function useObserveFocusVisibleForLegacyBrowsers()
in packages/component/src/hooks/internal/useObserveFocusVisible.ts
108 15 2
export default function useLocalizer()
in packages/api/src/hooks/useLocalizer.ts
43 14 1
export default function()
in packages/support/cldr-data-downloader/src/index.js
70 14 4
export default function connectivityStatus()
in packages/core/src/reducers/connectivityStatus.js
33 13 3
function useDebouncedNotifications()
in packages/api/src/hooks/useDebouncedNotifications.ts
47 12 0
function toAzureLocale()
in packages/embed/src/locale.js
31 12 1
export default function mirrorStyle()
in packages/component/src/Styles/mirrorStyle.js
22 11 2
export function findService()
in packages/embed/src/index.js
44 11 3
function disableElementWithUndo()
in packages/bundle/src/adaptiveCards/Attachment/AdaptiveCardRenderer.tsx
36 10 1
export default function createAdaptiveCardsAttachmentMiddleware()
in packages/bundle/src/adaptiveCards/createAdaptiveCardsAttachmentMiddleware.tsx
28 10 0
export default function createDefaultCardActionMiddleware()
in packages/component/src/Middleware/CardAction/createCoreMiddleware.js
44 10 0
export default function dictateState()
in packages/core/src/reducers/dictateState.js
22 10 3