hhvm / definition-finder
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 225 units with 2,279 lines of code in units (80.9% of code).
    • 2 very long units (350 lines of code)
    • 2 long units (158 lines of code)
    • 22 medium size units (682 lines of code)
    • 35 small units (509 lines of code)
    • 164 very small units (580 lines of code)
15% | 6% | 29% | 22% | 25%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
hack15% | 6% | 29% | 22% | 25%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/consumers34% | 8% | 40% | 14% | 3%
src/definitions0% | 11% | 13% | 19% | 54%
src/expression0% | 0% | 32% | 50% | 16%
src0% | 0% | 26% | 20% | 53%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
240 27 2
110 16 3
82 3 3
76 17 2
48 6 2
46 4 2
44 8 2
40 5 2
40 12 1
39 6 3
38 6 2
36 9 1
32 5 1
30 3 1
28 7 2
27 5 3
26 3 2
25 3 1
25 6 1
25 1 12
24 1 14
23 2 3
22 1 3
22 5 2
21 3 4
21 1 7
20 5 1
19 3 2
19 1 15
18 1 2
17 1 3
17 4 1
17 4 1
16 2 2
16 2 1
16 3 1
16 3 1
16 3 1
16 1 3
16 1 6
15 3 1
15 4 1
14 2 2
14 2 1
14 2 1
14 1 10
13 4 2
13 3 1
13 3 1
13 3 1