facebookincubator / zk
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 3,925 lines of code in units (83.4% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (104 lines of code)
    • 13 medium complex units (602 lines of code)
    • 36 simple units (948 lines of code)
    • 272 very simple units (2,271 lines of code)
0% | 2% | 15% | 24% | 57%
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
go0% | 2% | 15% | 24% | 57%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
internal/proto0% | 3% | 10% | 24% | 61%
internal/data0% | 0% | 38% | 0% | 61%
integration0% | 0% | 45% | 18% | 35%
ROOT0% | 0% | 13% | 23% | 63%
flw0% | 0% | 0% | 70% | 29%
example0% | 0% | 0% | 100% | 0%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
104 29 1
67 24 1
68 19 1
45 16 1
53 14 1
42 14 1
48 13 1
46 12 1
43 12 1
45 12 1
36 12 1
39 11 1
32 11 1
38 11 1
29 10 1
35 10 1
65 9 1
38 9 1
30 9 1
26 9 1
31 9 1
41 8 0
23 8 1
29 8 1
24 8 1
27 8 1
28 8 1
28 8 1
23 8 1
20 7 1
25 7 1
21 7 1
20 7 1
20 7 1
25 7 1
21 7 1
59 6 1
21 6 1
18 6 1
21 6 1
18 6 1
21 6 1
18 6 1
21 6 1
18 6 1
21 6 1
18 6 1
21 6 1
21 6 2
23 6 1