microsoft / arcade-machine-react
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 97 units with 1,054 lines of code in units (61.0% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (53 lines of code)
    • 2 medium complex units (90 lines of code)
    • 13 simple units (299 lines of code)
    • 81 very simple units (612 lines of code)
0% | 5% | 8% | 28% | 58%
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% | 6% | 10% | 32% | 50%
tsx0% | 0% | 0% | 9% | 90%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/focus0% | 15% | 27% | 13% | 43%
src0% | 0% | 0% | 41% | 58%
src/input0% | 0% | 0% | 75% | 25%
src/scroll0% | 0% | 0% | 36% | 63%
src/state0% | 0% | 0% | 24% | 75%
src/components0% | 0% | 0% | 9% | 90%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export function isForForm()
in src/focus/is-for-form.ts
53 27 2
public findNextFocus()
in src/focus/focus-by-raycast.ts
51 13 4
public find()
in src/focus/focus-by-distance.ts
39 12 0
public findNextFocus()
in src/focus/focus-by-registry.ts
29 10 2
private pollGamepad()
in src/input/gamepad-input.ts
22 8 2
public sendButton()
in src/focus-service.ts
26 7 1
private defaultFires()
in src/focus-service.ts
19 7 1
private bubbleEvent()
in src/focus-service.ts
29 7 3
public setDefaultFocus()
in src/focus-service.ts
18 7 0
public attempt()
in src/input/directional-debouncer.ts
28 7 1
public scrollTo()
in src/scroll/native-smooth-scrolling.ts
25 7 3
public componentDidMount()
in src/components/arc-focus-area.tsx
19 6 0
export function isFocusable()
in src/focus/dom-utils.ts
16 6 2
constructor()
in src/input/xbox-gamepad.ts
34 6 1
public scrollTo()
in src/scroll/index.ts
14 6 2
private recreateResolved()
in src/state/element-state-record.ts
20 6 0
public componentDidMount()
in src/components/arc-exclude.tsx
22 5 0
public calcPrimaryDistance()
in src/focus/focus-by-distance.ts
18 5 2
private getElementsInDirection()
in src/focus/focus-by-distance.ts
16 5 0
public scrollTo()
in src/scroll/smooth-scrolling-algorithm.ts
37 5 3