primer / primitives
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 663 units with 9,841 lines of code in units (463.1% of code).
    • 0 very long units (0 lines of code)
    • 48 long units (2,937 lines of code)
    • 113 medium size units (3,844 lines of code)
    • 77 small units (1,143 lines of code)
    • 425 very small units (1,917 lines of code)
0% | 29% | 39% | 11% | 19%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 29% | 39% | 11% | 19%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
data0% | 30% | 40% | 11% | 18%
script0% | 18% | 8% | 19% | 54%
src0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
75 1 1
72 1 1
71 1 1
70 1 1
69 1 1
68 1 1
68 1 1
68 1 1
67 1 1
67 1 1
66 1 1
66 1 1
66 1 1
65 1 1
65 1 1
65 1 1
64 1 1
64 1 1
64 1 1
63 1 1
63 1 1
63 1 1
62 1 1
62 1 1
61 1 1
61 1 1
61 1 1
60 1 1
60 1 1
59 1 1
59 1 1
58 1 1
58 1 1
57 1 1
57 1 1
56 1 1
56 1 1
55 1 1
55 1 1
54 1 1
54 1 1
53 1 1
53 1 1
52 1 1
52 1 1
51 8 6
51 1 1
51 1 1
50 1 1
50 1 1