hhvm / hsl
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 531 units with 5,441 lines of code in units (79.8% of code).
    • 1 very complex units (203 lines of code)
    • 0 complex units (0 lines of code)
    • 8 medium complex units (358 lines of code)
    • 17 simple units (505 lines of code)
    • 505 very simple units (4,375 lines of code)
3% | 0% | 6% | 9% | 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
php4% | 0% | 4% | 9% | 82%
hack0% | 0% | 32% | 10% | 56%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/legacy_fixme46% | 0% | 21% | 3% | 28%
src/tcp0% | 0% | 75% | 0% | 24%
minitest0% | 0% | 32% | 10% | 56%
src/io0% | 0% | 0% | 24% | 75%
src/math0% | 0% | 0% | 30% | 70%
src/os0% | 0% | 0% | 8% | 91%
src/random0% | 0% | 0% | 45% | 54%
src/regex0% | 0% | 0% | 22% | 77%
src/network0% | 0% | 0% | 26% | 73%
src/str0% | 0% | 0% | 4% | 95%
src/keyset0% | 0% | 0% | 9% | 90%
src/dict0% | 0% | 0% | 3% | 96%
src/vec0% | 0% | 0% | 0% | 100%
src/c0% | 0% | 0% | 0% | 100%
src/async0% | 0% | 0% | 0% | 100%
src/file0% | 0% | 0% | 0% | 100%
src/unix0% | 0% | 0% | 0% | 100%
src0% | 0% | 0% | 0% | 100%
src/locale0% | 0% | 0% | 0% | 100%
src/_Private0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
203 121 3
68 16 0
48 15 6
54 14 0
70 13 3
21 12 2
11 11 2
11 11 2
75 11 4
14 10 2
39 9 1
36 8 2
26 8 3
38 7 2
24 7 1
23 7 0
30 7 2
25 7 3
39 6 1
29 6 3
35 6 2
21 6 1
37 6 3
45 6 3
17 6 2
27 6 2
16 5 1
9 5 1
8 5 2
8 5 2
8 5 2
8 5 2
8 5 2
6 5 1
19 5 3
20 5 2
20 5 2
15 5 0
25 5 3
30 5 3
19 5 3
28 5 1
49 5 0
27 5 1
19 5 3
21 5 2
32 5 3
19 5 3
19 5 3
20 5 4