reactjs / react-magic
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 762 lines of code in units (59.3% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (95 lines of code)
    • 9 medium size units (242 lines of code)
    • 9 small units (127 lines of code)
    • 57 very small units (298 lines of code)
0% | 12% | 31% | 16% | 39%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 12% | 31% | 16% | 39%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
site0% | 36% | 27% | 5% | 31%
src0% | 0% | 34% | 22% | 43%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
95 6 0
41 5 0
30 1 0
30 5 1
29 2 0
23 7 1
23 6 1
22 3 0
22 8 1
22 9 2
18 2 3
16 4 2
16 6 2
15 4 1
13 2 0
13 2 1
12 4 1
12 5 1
12 3 1
10 2 0
10 2 1
10 4 1
9 1 1
9 3 2
9 2 0
9 1 2
9 1 0
9 4 1
7 1 0
7 1 1
7 4 3
7 2 1
7 2 1
7 2 1
6 1 0
6 1 1
6 1 0
6 2 1
5 1 0
5 2 0
5 3 0
5 3 2
5 2 0
5 1 0
5 3 2
5 2 2
5 1 1
5 4 1
5 1 0
5 1 1