hhvm / definition-finder
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 225 units with 2,279 lines of code in units (80.9% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (240 lines of code)
    • 3 medium complex units (226 lines of code)
    • 7 simple units (258 lines of code)
    • 214 very simple units (1,555 lines of code)
0% | 10% | 9% | 11% | 68%
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
hack0% | 10% | 9% | 11% | 68%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/consumers0% | 23% | 10% | 16% | 48%
src/definitions0% | 0% | 11% | 0% | 88%
src/expression0% | 0% | 10% | 6% | 82%
src0% | 0% | 0% | 26% | 73%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
240 27 2
76 17 2
110 16 3
40 12 1
36 9 1
44 8 2
28 7 2
38 6 2
39 6 3
48 6 2
25 6 1
27 5 3
40 5 2
22 5 2
20 5 1
32 5 1
46 4 2
17 4 1
13 4 2
17 4 1
15 4 1
19 3 2
30 3 1
15 3 1
26 3 2
82 3 3
12 3 2
16 3 1
25 3 1
16 3 1
16 3 1
13 3 1
13 3 1
13 3 1
21 3 4
6 3 1
10 2 1
14 2 2
8 2 1
12 2 2
23 2 3
16 2 2
16 2 1
9 2 2
9 2 1
11 2 1
14 2 1
14 2 1
13 2 8
6 2 2