instagram / Fixit
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 289 units with 2,742 lines of code in units (42.9% of code).
    • 0 very long units (0 lines of code)
    • 7 long units (466 lines of code)
    • 26 medium size units (742 lines of code)
    • 47 small units (665 lines of code)
    • 209 very small units (869 lines of code)
0% | 16% | 27% | 24% | 31%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 16% | 27% | 24% | 31%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
fixit/rules0% | 28% | 34% | 18% | 18%
fixit/cli0% | 10% | 18% | 33% | 36%
fixit/common0% | 0% | 20% | 27% | 52%
fixit0% | 0% | 0% | 35% | 64%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
97 8 2
69 8 2
66 11 2
63 9 1
62 12 2
57 6 2
52 11 1
45 9 2
44 10 1
41 12 2
38 5 1
38 12 2
34 7 2
32 8 2
32 12 3
31 9 2
30 15 2
27 2 1
26 6 1
25 4 3
25 13 2
25 3 2
25 7 2
24 9 2
24 4 2
23 10 2
23 6 2
23 8 2
22 9 2
22 7 2
21 4 2
21 5 2
21 5 2
20 3 2
20 8 2
19 8 2
19 5 2
19 7 2
19 1 2
17 2 1
17 2 1
17 3 1
17 5 2
16 3 2
16 2 1
16 10 0
16 6 3
15 1 0
15 2 1
15 6 2