facebookincubator / superconsole
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 134 units with 1,854 lines of code in units (58.3% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (98 lines of code)
    • 29 medium size units (865 lines of code)
    • 36 small units (519 lines of code)
    • 68 very small units (372 lines of code)
0% | 5% | 46% | 27% | 20%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
rs0% | 5% | 46% | 27% | 20%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/content0% | 18% | 11% | 44% | 26%
src/components0% | 0% | 76% | 14% | 9%
src0% | 0% | 20% | 40% | 38%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
98 1 0
49 1 0
48 1 0
44 4 4
39 1 0
34 1 0
34 1 0
33 1 0
32 1 3
32 1 0
32 1 0
30 1 0
29 1 0
28 1 0
28 2 4
28 1 0
28 1 0
27 1 0
27 1 0
27 3 1
26 2 5
25 1 0
25 1 0
25 1 0
24 1 0
23 1 0
23 1 0
22 1 0
22 1 0
21 1 0
20 1 0
19 1 0
19 7 2
18 1 0
18 1 2
17 1 0
17 1 0
17 1 1
16 1 0
16 2 2
16 1 0
16 3 0
15 1 0
15 1 0
15 1 0
15 1 0
15 1 0
15 1 4
15 1 0
14 1 0