hhvm / fbexpect
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 83 units with 1,084 lines of code in units (97.7% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 12 medium size units (378 lines of code)
    • 28 small units (420 lines of code)
    • 43 very small units (286 lines of code)
0% | 0% | 34% | 38% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
hack0% | 0% | 34% | 38% | 26%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 0% | 33% | 39% | 27%
src/Constraint0% | 0% | 61% | 26% | 11%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
48 8 4
42 7 4
37 8 4
37 8 4
37 2 0
29 6 4
29 6 3
27 2 2
27 6 3
22 5 3
22 5 3
21 3 1
20 4 3
20 4 3
19 3 4
17 5 3
17 2 3
17 2 3
17 2 3
17 2 3
17 2 3
17 2 3
17 2 3
17 2 3
16 2 3
16 6 1
15 1 3
15 1 2
14 6 1
13 1 3
13 1 3
12 2 2
12 2 2
12 2 2
12 2 2
12 2 2
12 2 2
12 3 1
11 1 3
11 1 2
9 1 4
9 1 3
9 1 1
9 1 2
9 1 3
9 8 1
9 1 3
8 1 3
8 1 3
8 1 3