facebook / regenerator
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 129 units with 1,844 lines of code in units (84.8% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (471 lines of code)
    • 4 medium complex units (161 lines of code)
    • 10 simple units (243 lines of code)
    • 113 very simple units (969 lines of code)
0% | 25% | 8% | 13% | 52%
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
js0% | 25% | 8% | 13% | 52%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
packages/transform/src0% | 36% | 0% | 9% | 54%
packages/runtime0% | 0% | 26% | 24% | 48%
lib0% | 0% | 59% | 18% | 22%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
257 37 2
214 35 2
45 24 2
55 16 3
34 13 1
27 12 2
46 9 2
30 9 2
38 9 1
17 8 1
27 7 1
16 7 2
18 7 2
18 7 4
19 6 1
14 6 1
7 5 1
24 5 4
20 5 3
25 5 0
23 5 1
31 5 1
7 4 4
12 4 5
19 4 1
14 4 1
27 4 1
19 4 3
13 4 2
13 4 1
33 4 1
4 4 1
41 4 0
10 4 1
11 4 1
14 3 2
11 3 1
10 3 1
6 3 2
14 3 1
19 3 2
5 3 2
14 3 1
4 3 1
6 2 0
4 2 0
7 2 3
10 2 1
2 2 2
6 2 1