microsoft / satcheljs
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 62 units with 633 lines of code in units (67.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (90 lines of code)
    • 2 simple units (55 lines of code)
    • 59 very simple units (488 lines of code)
0% | 0% | 14% | 8% | 77%
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
ts0% | 0% | 14% | 8% | 77%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/legacy0% | 0% | 30% | 0% | 69%
src/legacy/react0% | 0% | 0% | 45% | 54%
src0% | 0% | 0% | 11% | 88%
src/legacy/promise0% | 0% | 0% | 0% | 100%
src/legacy/stitch0% | 0% | 0% | 0% | 100%
src/legacy/trace0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function spyOnChanges()
in src/legacy/createUndo.ts
90 11 1
export default function reactive()
in src/legacy/react/reactive.ts
39 7 1
16 6 1
function trackUndo()
in src/legacy/createUndo.ts
33 4 2
export function dispatch()
in src/dispatcher.ts
10 3 1
export default function action()
in src/legacy/action.ts
9 3 2
function decorateClassMethod()
in src/legacy/action.ts
13 3 5
function wrapInAction()
in src/legacy/promise/actionWrappers.ts
15 3 2
export function promiseMiddleware()
in src/legacy/promise/promiseMiddleware.ts
22 3 5
function isReactComponent()
in src/legacy/react/reactive.ts
3 3 1
export default function select()
in src/legacy/select.ts
15 3 1
let returnValue: any = function()
in src/legacy/select.ts
11 3 0
export function stitch()
in src/legacy/stitch/stitch.ts
13 3 5
3 2 1
7 2 1
export function subscribe()
in src/dispatcher.ts
7 2 2
5 2 0
function initializeSpy()
in src/legacy/createUndo.ts
6 2 0
function disposeSpy()
in src/legacy/createUndo.ts
7 2 0
export default function dispatch()
in src/legacy/dispatch.ts
13 2 4