hhvm / hacktest
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 74 units with 1,062 lines of code in units (85.4% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (170 lines of code)
    • 3 medium complex units (184 lines of code)
    • 5 simple units (220 lines of code)
    • 65 very simple units (488 lines of code)
0% | 16% | 17% | 20% | 45%
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% | 16% | 17% | 20% | 45%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/Framework0% | 65% | 0% | 0% | 34%
src/_Private0% | 0% | 33% | 15% | 51%
src/Retriever0% | 0% | 27% | 36% | 35%
src0% | 0% | 0% | 34% | 65%
src/Runner0% | 0% | 0% | 66% | 33%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
170 29 1
49 14 2
87 12 2
48 11 0
65 9 0
35 7 3
27 7 2
37 7 1
56 6 0
15 5 0
15 5 0
26 5 1
35 5 3
31 5 2
15 4 1
15 4 0
11 4 1
15 3 1
38 3 1
7 2 1
11 2 2
7 2 1
7 2 1
13 2 3
13 2 3
11 2 2
8 2 5
4 2 2
3 2 0
9 2 5
4 1 1
10 1 0
3 1 0
11 1 3
5 1 0
1 1 0
1 1 0
1 1 0
1 1 0
3 1 1
3 1 1
3 1 0
5 1 2
3 1 1
3 1 1
6 1 1
11 1 1
3 1 0
2 1 1
8 1 2