hhvm / hhvm-third-party
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 2,278 units with 56,956 lines of code in units (29.7% of code).
    • 17 very complex units (13,869 lines of code)
    • 59 complex units (6,191 lines of code)
    • 189 medium complex units (11,575 lines of code)
    • 228 simple units (7,017 lines of code)
    • 1,785 very simple units (18,304 lines of code)
24% | 10% | 20% | 12% | 32%
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
cpp30% | 6% | 17% | 13% | 31%
c19% | 17% | 23% | 11% | 27%
h0% | 10% | 0% | 1% | 88%
cc0% | 0% | 33% | 9% | 56%
rb0% | 0% | 0% | 30% | 69%
pl0% | 0% | 0% | 52% | 47%
pas0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ragel/src/ragel30% | 6% | 17% | 13% | 32%
pcre28% | 3% | 8% | 3% | 56%
pcre/sljit17% | 20% | 32% | 11% | 17%
libmbfl/filters0% | 25% | 31% | 26% | 16%
libmbfl/mbfl0% | 0% | 28% | 0% | 71%
ragel/src/contrib0% | 0% | 0% | 30% | 69%
ragel/src/aapl0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
6262 2791 0
2276 573 2
2372 315 2
261 149 5
236 107 5
287 102 6
238 88 6
237 87 6
197 80 3
188 79 8
221 75 6
151 73 6
197 64 3
181 60 6
240 59 3
162 58 7
163 54 9
96 50 6
105 49 9
116 49 9
139 48 6
135 48 7
125 48 6
140 46 2
140 46 2
121 45 6
93 44 2
136 44 2
110 42 9
123 42 7
79 42 6
48 41 2
117 41 7
119 39 2
101 39 7
83 38 6
117 37 7
124 36 3
151 36 7
77 35 2
109 35 9
90 34 8
112 33 2
95 32 2
196 32 2
129 31 6
48 31 6
79 30 2
79 30 2
102 30 7