reactjs / react-rails
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 174 units with 1,155 lines of code in units (64.2% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 8 medium size units (233 lines of code)
    • 20 small units (287 lines of code)
    • 146 very small units (635 lines of code)
0% | 0% | 20% | 24% | 54%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 0% | 28% | 20% | 50%
rb0% | 0% | 10% | 29% | 59%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/assets/javascripts0% | 0% | 25% | 21% | 52%
react_ujs0% | 0% | 65% | 0% | 34%
lib/generators/react0% | 0% | 16% | 47% | 36%
lib/react/rails0% | 0% | 35% | 0% | 64%
react_ujs/src/events0% | 0% | 32% | 0% | 67%
lib/react/server_rendering0% | 0% | 0% | 30% | 69%
react_ujs/src/getConstructor0% | 0% | 0% | 100% | 0%
lib0% | 0% | 0% | 100% | 0%
lib/react/jsx0% | 0% | 0% | 0% | 100%
lib/react0% | 0% | 0% | 0% | 100%
react_ujs/src0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
35 10 1
35 10 1
31 8 0
29 8 4
27 11 1
26 5 1
26 5 1
24 4 3
18 4 0
18 5 3
18 4 0
18 5 1
17 3 1
17 6 0
17 3 1
15 11 1
15 2 1
15 2 1
13 4 2
13 3 0
13 2 1
13 4 0
12 2 1
11 3 0
11 4 1
11 1 1
11 2 1
11 4 1
10 3 1
10 3 0
9 2 0
9 2 3
9 3 1
9 2 1
8 3 0
8 2 0
8 1 3
8 2 3
8 1 3
8 1 1
7 2 0
7 2 0
7 2 0
7 3 1
7 1 3
7 2 2
7 2 1
7 3 1
7 3 1
7 2 1