hhvm / xhp-lib
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 232 units with 1,741 lines of code in units (49.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (151 lines of code)
    • 8 simple units (184 lines of code)
    • 221 very simple units (1,406 lines of code)
0% | 0% | 8% | 10% | 80%
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% | 0% | 8% | 10% | 80%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
core0% | 0% | 19% | 23% | 57%
Reflection0% | 0% | 15% | 11% | 73%
html0% | 0% | 0% | 26% | 73%
ChildValidation0% | 0% | 0% | 0% | 100%
exceptions0% | 0% | 0% | 0% | 100%
html/tags/d0% | 0% | 0% | 0% | 100%
html/tags/t0% | 0% | 0% | 0% | 100%
html/tags/s0% | 0% | 0% | 0% | 100%
html/tags/h0% | 0% | 0% | 0% | 100%
html/tags/r0% | 0% | 0% | 0% | 100%
html/tags/c0% | 0% | 0% | 0% | 100%
html/tags/f0% | 0% | 0% | 0% | 100%
html/tags/a0% | 0% | 0% | 0% | 100%
html/tags/m0% | 0% | 0% | 0% | 100%
html/tags/b0% | 0% | 0% | 0% | 100%
html/tags/l0% | 0% | 0% | 0% | 100%
html/tags/p0% | 0% | 0% | 0% | 100%
html/tags/o0% | 0% | 0% | 0% | 100%
html/tags/v0% | 0% | 0% | 0% | 100%
html/tags/n0% | 0% | 0% | 0% | 100%
html/tags/i0% | 0% | 0% | 0% | 100%
html/tags/e0% | 0% | 0% | 0% | 100%
html/tags/u0% | 0% | 0% | 0% | 100%
html/tags/q0% | 0% | 0% | 0% | 100%
html/tags/k0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
60 14 2
50 14 2
41 11 0
29 10 1
19 7 1
24 7 0
18 7 0
40 6 3
22 6 0
18 6 0
14 6 0
17 5 1
18 5 1
16 4 0
16 4 1
14 3 0
14 3 0
11 3 0
9 3 1
12 3 0
8 3 0
11 3 0
7 3 1
6 3 3
5 3 1
9 3 0
24 3 0
21 3 0
9 2 0
7 2 0
7 2 0
9 2 2
8 2 1
9 2 1
9 2 2
6 2 2
9 2 2
11 2 1
8 2 1
8 2 0
11 2 0
3 2 2
17 2 0
17 2 0
13 2 0
6 2 0
14 2 0
10 2 0
12 2 0
2 1 0