hhvm / hhast
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 4,900 units with 46,316 lines of code in units (81.3% of code).
    • 1 very complex units (273 lines of code)
    • 1 complex units (108 lines of code)
    • 43 medium complex units (2,556 lines of code)
    • 123 simple units (4,237 lines of code)
    • 4,732 very simple units (39,142 lines of code)
<1% | <1% | 5% | 9% | 84%
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
hack<1% | <1% | 5% | 9% | 84%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/Linters7% | 0% | 18% | 21% | 52%
src/Migrations0% | 5% | 22% | 26% | 46%
codegen/syntax0% | 0% | 2% | 5% | 92%
src/__Private0% | 0% | 16% | 19% | 64%
src/__Private/Resolution0% | 0% | 48% | 23% | 27%
src0% | 0% | 13% | 17% | 68%
src/__Private/codegen0% | 0% | 4% | 20% | 74%
src/__Private/LSPImpl0% | 0% | 0% | 22% | 77%
src/__Private/LSPLib0% | 0% | 0% | 23% | 76%
src/nodes0% | 0% | 0% | 8% | 91%
codegen0% | 0% | 0% | 8% | 91%
codegen/tokens0% | 0% | 0% | 0% | 100%
src/__Private/Wrap0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
273 64 2
108 28 5
93 24 2
64 22 2
59 21 2
57 21 2
97 21 1
75 20 1
55 19 2
25 19 1
56 18 2
99 18 0
97 18 2
180 18 10
52 17 2
90 17 2
52 16 2
75 16 1
42 16 2
18 16 1
48 15 2
46 15 2
42 14 2
44 14 2
76 14 1
19 14 1
38 13 2
41 13 2
44 13 2
67 13 2
66 13 0
52 13 2
91 13 1
38 12 2
42 12 2
60 12 3
61 12 3
48 12 2
48 12 2
62 12 0
34 11 2
33 11 2
73 11 1
31 11 1
66 11 3
37 10 2
36 10 2
36 10 2
33 10 2
108 10 2