facebook / taste-tester
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 124 units with 1,513 lines of code in units (67.0% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (262 lines of code)
    • 16 medium size units (493 lines of code)
    • 27 small units (421 lines of code)
    • 77 very small units (337 lines of code)
0% | 17% | 32% | 27% | 22%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
rb0% | 17% | 32% | 27% | 22%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/taste_tester0% | 17% | 32% | 27% | 22%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
71 8 0
65 19 0
65 11 0
61 10 1
48 13 0
47 12 0
42 12 4
37 10 0
34 6 0
32 4 1
29 7 0
28 5 0
28 3 2
27 4 1
26 7 2
25 6 0
24 2 0
23 1 1
22 4 0
21 5 1
19 7 0
19 3 1
19 5 0
19 2 0
19 6 0
18 3 0
18 3 0
18 3 0
18 6 0
18 1 0
18 5 0
17 3 0
17 4 0
16 2 0
16 4 0
15 1 1
14 2 2
14 3 0
14 1 0
13 3 0
13 3 0
13 2 0
12 3 0
11 3 1
11 2 0
11 2 0
11 3 0
10 3 0
9 1 2
9 3 1