primer / doctocat
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 41 units with 902 lines of code in units (46.9% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (327 lines of code)
    • 12 medium size units (373 lines of code)
    • 8 small units (109 lines of code)
    • 17 very small units (93 lines of code)
0% | 36% | 41% | 12% | 10%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 36% | 41% | 12% | 10%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
theme0% | 36% | 41% | 12% | 10%
Alternative Visuals
Longest Units
Top 41 longest units
Unit# linesMcCabe index# params
100 13 2
85 5 1
83 6 2
59 3 1
48 6 1
44 3 5
41 2 2
35 7 3
34 2 3
32 3 3
27 2 2
24 1 0
24 1 2
22 4 1
21 4 2
21 3 2
17 3 1
16 1 1
15 1 4
15 1 0
13 4 2
11 1 2
11 3 1
11 3 2
10 2 2
10 1 1
8 3 1
8 2 1
7 1 1
7 1 1
7 1 2
6 2 0
4 1 1
4 1 0
4 1 0
3 1 3
3 2 1
3 1 1
3 1 1
3 2 1
3 1 1