primer / stylelint-config
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 26 units with 402 lines of code in units (35.4% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (278 lines of code)
    • 1 medium size units (31 lines of code)
    • 3 small units (38 lines of code)
    • 18 very small units (55 lines of code)
0% | 69% | 7% | 9% | 13%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 69% | 7% | 9% | 13%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
plugins0% | 61% | 9% | 11% | 17%
ROOT0% | 100% | 0% | 0% | 0%
Alternative Visuals
Longest Units
Top 26 longest units
Unit# linesMcCabe index# params
83 1 1
73 17 3
63 11 4
59 13 4
31 7 2
14 6 1
13 6 1
11 3 0
9 4 1
6 3 2
5 2 1
4 1 1
4 2 1
3 1 0
3 2 1
3 2 3
3 1 1
3 2 1
3 1 1
3 1 1
1 1 0
1 1 0
1 1 0
1 1 0
1 1 0
1 1 0