novifinancial / fastpay
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 90 units with 1,396 lines of code in units (35.6% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (289 lines of code)
    • 20 medium size units (580 lines of code)
    • 11 small units (183 lines of code)
    • 55 very small units (344 lines of code)
0% | 20% | 41% | 13% | 24%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
rs0% | 24% | 41% | 10% | 23%
py0% | 0% | 42% | 25% | 32%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
fastpay/src0% | 37% | 42% | 5% | 14%
fastpay_core/src0% | 9% | 40% | 17% | 32%
scripts0% | 0% | 42% | 25% | 32%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
84 3 2
79 3 0
70 6 1
56 4 2
47 3 7
47 2 2
39 4 2
33 4 2
32 6 2
32 1 5
29 4 0
29 4 2
28 3 2
28 2 2
27 1 3
25 2 6
25 1 4
24 2 2
23 1 6
23 1 2
23 1 2
22 2 4
22 2 5
22 2 2
20 1 1
20 1 0
19 4 2
19 4 2
18 1 2
17 2 0
16 1 4
14 1 2
14 1 2
13 1 2
13 1 3
10 3 2
10 1 3
10 1 3
10 1 2
10 1 2
10 2 2
10 1 0
10 1 2
10 1 1
10 2 3
9 1 2
9 1 1
9 3 2
9 2 2
8 1 3