hhvm / hh-apidoc
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 101 units with 1,664 lines of code in units (84.2% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (95 lines of code)
    • 3 medium complex units (139 lines of code)
    • 10 simple units (398 lines of code)
    • 87 very simple units (1,032 lines of code)
0% | 5% | 8% | 23% | 62%
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% | 5% | 8% | 23% | 62%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/DocBlock0% | 45% | 0% | 34% | 20%
src/MarkdownExt0% | 0% | 25% | 31% | 42%
src/PageSections/_Private0% | 0% | 23% | 17% | 58%
src0% | 0% | 5% | 16% | 77%
src/PageSections0% | 0% | 0% | 27% | 72%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
95 30 1
60 12 2
38 11 2
41 11 3
49 9 0
36 9 1
53 9 2
42 9 0
42 8 2
56 8 0
30 7 3
31 7 2
31 7 0
28 6 1
45 5 1
31 5 0
33 5 0
20 5 2
24 5 1
29 4 4
24 4 2
18 4 0
30 4 2
13 4 1
16 4 2
20 4 1
11 3 1
12 3 0
22 3 2
22 3 0
16 3 2
9 3 0
18 3 1
9 3 1
18 2 2
12 2 0
12 2 2
8 2 1
7 2 0
7 2 0
12 2 3
7 2 0
18 2 3
10 2 1
6 2 1
6 2 1
6 2 1
6 2 1
11 2 3
9 2 2