facebookincubator / automerge
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 322 units with 4,792 lines of code in units (89.8% of code).
    • 3 very complex units (400 lines of code)
    • 4 complex units (217 lines of code)
    • 39 medium complex units (1,423 lines of code)
    • 52 simple units (1,068 lines of code)
    • 224 very simple units (1,684 lines of code)
8% | 4% | 29% | 22% | 35%
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
js8% | 4% | 29% | 22% | 35%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
backend12% | 4% | 35% | 20% | 27%
frontend0% | 4% | 20% | 30% | 44%
src0% | 0% | 0% | 13% | 86%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
163 116 7
136 77 4
101 59 8
64 46 5
62 46 2
35 35 2
56 26 2
57 25 3
32 24 2
64 22 2
37 21 4
34 20 4
76 20 2
48 20 3
38 18 2
33 18 3
47 17 3
28 17 2
34 17 2
44 17 2
40 17 2
37 16 2
23 16 5
35 16 2
25 15 2
29 15 1
36 14 1
36 14 0
27 14 2
36 14 4
49 13 3
22 13 0
28 13 2
34 13 2
60 13 2
30 12 2
30 12 3
29 12 1
37 12 1
17 11 3
38 11 3
36 11 6
18 11 6
23 11 2
62 11 2
14 11 3
34 10 1
29 10 3
28 10 2
23 10 0