hhvm / hhvm-autoload
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 70 units with 820 lines of code in units (86.0% of code).
    • 1 very long units (110 lines of code)
    • 2 long units (108 lines of code)
    • 7 medium size units (211 lines of code)
    • 10 small units (147 lines of code)
    • 50 very small units (244 lines of code)
13% | 13% | 25% | 17% | 29%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
hack13% | 13% | 26% | 18% | 28%
php0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src19% | 9% | 19% | 20% | 31%
src/builders0% | 23% | 44% | 13% | 18%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
110 12 1
55 8 2
53 2 2
44 4 1
33 6 0
28 8 2
28 7 2
28 9 2
25 5 0
25 9 1
19 4 2
18 3 0
17 8 0
17 5 1
15 3 2
15 2 2
13 3 0
11 3 1
11 1 2
11 3 1
10 2 1
10 2 0
9 1 2
9 2 2
9 2 2
8 1 1
8 1 1
7 2 1
7 2 1
7 2 1
7 2 0
7 2 2
7 2 2
6 1 2
6 1 2
6 2 2
6 2 2
5 1 0
5 1 0
5 1 0
5 1 1
4 1 0
4 1 0
4 1 0
4 1 1
4 1 1
4 1 1
4 1 1
4 1 1
4 1 1