relayjs / eslint-plugin-relay
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 76 units with 1,571 lines of code in units (92.1% of code).
    • 3 very long units (530 lines of code)
    • 2 long units (123 lines of code)
    • 14 medium size units (433 lines of code)
    • 15 small units (217 lines of code)
    • 42 very small units (268 lines of code)
33% | 7% | 27% | 13% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js33% | 7% | 27% | 13% | 17%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src33% | 7% | 27% | 13% | 17%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
242 41 1
185 30 1
103 12 8
64 15 5
59 7 1
40 8 1
38 5 1
37 6 1
36 6 1
35 14 2
34 2 1
33 12 5
32 5 1
28 8 3
27 6 3
25 10 1
24 8 3
23 2 1
21 6 1
19 1 3
18 7 1
17 11 1
16 3 5
15 8 1
15 3 2
14 4 3
14 4 1
14 4 1
14 4 2
13 7 1
13 5 1
13 4 1
11 4 2
11 4 1
10 3 1
10 2 1
10 3 1
10 2 1
9 4 1
9 4 1
9 4 1
9 3 1
9 1 3
8 1 3
8 1 1
8 1 1
8 2 1
8 2 1
8 3 1
7 3 1