novifinancial / smtree
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 93 units with 905 lines of code in units (37.2% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (132 lines of code)
    • 11 medium size units (297 lines of code)
    • 10 small units (150 lines of code)
    • 70 very small units (326 lines of code)
0% | 14% | 32% | 16% | 36%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
rs0% | 14% | 32% | 16% | 36%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 14% | 32% | 16% | 36%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
77 6 3
55 7 2
43 7 2
42 8 2
34 7 2
24 1 2
23 6 2
23 5 2
23 2 2
22 2 2
21 2 0
21 1 0
21 3 1
19 4 1
18 4 2
18 5 4
17 2 2
16 3 1
15 2 5
14 1 3
11 1 3
11 2 3
11 4 5
10 1 3
10 3 2
10 2 2
10 1 3
10 1 2
9 1 2
9 2 2
8 2 2
8 2 2
8 2 2
8 1 4
7 1 3
7 2 1
7 2 1
7 1 3
7 2 1
7 2 1
7 1 2
7 1 0
6 1 2
6 2 2
6 1 2
6 1 2
6 1 2
5 1 1
5 1 2
3 1 2