facebook / hermes
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 9,216 units with 117,993 lines of code in units (52.9% of code).
    • 17 very complex units (9,073 lines of code)
    • 61 complex units (6,941 lines of code)
    • 360 medium complex units (20,232 lines of code)
    • 632 simple units (19,446 lines of code)
    • 8,146 very simple units (62,301 lines of code)
7% | 5% | 17% | 16% | 52%
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
cpp8% | 7% | 19% | 18% | 46%
rs34% | 4% | 10% | 9% | 41%
js<1% | 7% | 19% | 20% | 51%
java0% | 2% | 18% | 23% | 55%
h0% | <1% | 2% | 4% | 91%
py0% | 3% | 33% | 21% | 42%
mm0% | 0% | 31% | 18% | 50%
inc0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib7% | 6% | 21% | 19% | 44%
unsupported32% | 4% | 9% | 9% | 43%
API9% | 5% | 6% | 8% | 70%
tools2% | 7% | 18% | 20% | 51%
include0% | <1% | 2% | 4% | 92%
utils0% | 4% | 35% | 16% | 43%
lldb0% | 0% | 13% | 0% | 86%
unittests0% | 0% | 0% | 4% | 95%
npm0% | 0% | 0% | 29% | 70%
website0% | 0% | 0% | 0% | 100%
public0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
2433 238 2
2696 235 1
402 118 2
439 105 1
517 87 5
210 71 1
121 69 3
304 69 5
234 67 6
248 66 6
251 66 2
360 62 1
232 61 4
183 58 2
102 54 1
184 52 0
157 51 1
154 49 4
170 45 6
133 44 0
73 43 2
95 42 0
189 41 0
87 40 0
102 40 3
101 40 1
135 40 1
171 40 3
287 40 2
116 39 2
135 39 1
144 39 6
117 37 0
187 37 0
157 37 0
99 36 5
136 35 3
134 35 1
53 35 1
117 34 3
216 34 1
89 33 1
73 33 5
181 33 3
111 32 4
40 32 1
161 32 2
120 32 2
66 31 2
128 31 4