novifinancial / ristretto255-js
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 35 units with 376 lines of code in units (32.1% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (51 lines of code)
    • 3 medium size units (118 lines of code)
    • 3 small units (39 lines of code)
    • 28 very small units (168 lines of code)
0% | 13% | 31% | 10% | 44%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 13% | 31% | 10% | 44%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 14% | 32% | 10% | 42%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 35 longest units
Unit# linesMcCabe index# params
51 1 2
50 1 1
39 2 2
29 1 3
16 3 0
12 1 1
11 3 2
10 1 1
9 3 3
9 4 2
9 2 1
9 2 3
9 2 1
9 2 2
9 2 1
9 2 2
8 1 2
7 1 1
7 2 1
6 1 3
5 1 1
5 1 1
5 1 2
5 1 2
5 1 1
5 1 2
4 1 0
3 1 2
3 1 0
3 1 2
3 1 2
3 1 2
3 1 1
3 1 0
3 1 2