relayjs / relay-examples
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 83 units with 1,346 lines of code in units (44.5% of code).
    • 0 very long units (0 lines of code)
    • 7 long units (501 lines of code)
    • 10 medium size units (410 lines of code)
    • 10 small units (143 lines of code)
    • 56 very small units (292 lines of code)
0% | 37% | 30% | 10% | 21%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 37% | 30% | 10% | 21%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
issue-tracker/src0% | 45% | 21% | 11% | 21%
todo/js/components0% | 76% | 21% | 0% | 2%
todo/js/mutations0% | 30% | 50% | 3% | 16%
issue-tracker/src/routing0% | 0% | 67% | 9% | 22%
todo/js0% | 0% | 0% | 100% | 0%
todo/js/entrypoints0% | 0% | 0% | 100% | 0%
todo/data0% | 0% | 0% | 16% | 83%
todo/js/utilities0% | 0% | 0% | 64% | 35%
todo/data/schema0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
99 8 1
90 15 1
83 2 4
70 1 1
55 4 1
53 1 2
51 2 2
50 2 2
50 4 0
48 2 3
45 1 2
43 3 3
42 6 1
40 3 1
34 4 3
30 1 1
28 2 2
19 3 0
16 1 2
16 1 1
15 1 1
15 1 1
14 1 0
13 1 1
13 2 0
11 2 2
11 2 1
10 1 1
10 1 1
10 2 1
10 1 2
9 1 1
9 3 0
8 1 1
8 1 1
8 2 2
8 1 2
8 1 2
8 1 1
7 1 1
7 1 2
7 2 1
7 2 1
7 1 0
7 1 0
7 3 2
6 1 1
6 1 2
6 1 1
6 1 2