primer / 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 263 units with 5,646 lines of code in units (26.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 8 medium complex units (1,410 lines of code)
    • 7 simple units (211 lines of code)
    • 248 very simple units (4,025 lines of code)
0% | 0% | 24% | 3% | 71%
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
tsx0% | 0% | 24% | 3% | 72%
ts0% | 0% | 23% | 5% | 70%
js0% | 0% | 38% | 12% | 49%
rb0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 0% | 25% | 3% | 70%
codemods0% | 0% | 0% | 42% | 57%
script0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
82 25 3
101 20 5
87 20 6
231 17 1
230 17 1
229 17 1
227 17 1
223 17 1
36 9 2
37 7 4
27 6 3
43 6 2
47 6 0
11 6 1
10 6 1
28 5 2
20 5 0
8 5 2
16 5 1
22 5 3
16 5 2
36 5 0
3 5 1
22 5 4
9 5 1
29 5 2
12 4 1
12 4 1
75 4 0
42 4 0
18 4 1
7 4 2
12 4 1
21 4 0
12 4 3
6 4 1
11 3 0
8 3 1
18 3 3
17 3 5
14 3 1
10 3 4
8 3 2
10 3 2
10 3 2
21 3 5
39 3 0
17 3 0
24 3 0
45 3 0