facebook / squangle
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 662 units with 5,265 lines of code in units (56.0% of code).
    • 1 very complex units (145 lines of code)
    • 0 complex units (0 lines of code)
    • 6 medium complex units (313 lines of code)
    • 32 simple units (888 lines of code)
    • 623 very simple units (3,919 lines of code)
2% | 0% | 5% | 16% | 74%
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
cpp3% | 0% | 7% | 22% | 66%
h0% | 0% | 1% | 1% | 96%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
mysql_client2% | 0% | 5% | 16% | 74%
logger0% | 0% | 12% | 20% | 67%
base0% | 0% | 0% | 27% | 72%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
145 52 2
108 25 0
43 20 5
66 14 0
29 14 1
26 11 1
41 11 2
26 10 1
32 10 1
60 9 2
21 8 1
18 7 1
16 7 2
34 7 0
42 7 2
28 7 0
44 7 0
45 7 0
19 7 1
40 7 2
40 7 2
45 7 2
28 6 0
28 6 0
20 6 1
15 6 2
15 6 0
20 6 0
17 6 1
17 6 1
27 6 2
30 6 5
23 6 1
20 6 0
32 6 1
33 6 1
22 6 0
26 6 0
5 6 1
19 5 0
27 5 1
27 5 3
20 5 0
15 5 1
15 5 1
11 5 2
19 5 2
26 5 2
23 5 1
13 5 1