reactjs / react-modal
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 59 units with 609 lines of code in units (53.0% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 6 medium size units (184 lines of code)
    • 12 small units (182 lines of code)
    • 41 very small units (243 lines of code)
0% | 0% | 30% | 29% | 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% | 0% | 34% | 30% | 34%
py0% | 0% | 0% | 23% | 76%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/helpers0% | 0% | 33% | 27% | 39%
src/components0% | 0% | 38% | 38% | 23%
scripts0% | 0% | 0% | 23% | 76%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
46 16 2
39 5 0
28 11 2
28 8 2
22 6 1
21 4 0
19 7 1
19 4 0
18 3 1
17 9 0
17 5 0
15 5 0
14 7 3
14 4 0
14 8 1
12 7 1
12 3 0
11 2 1
10 3 3
10 4 0
10 4 1
10 3 0
10 2 1
10 2 0
9 2 1
9 1 1
9 3 0
9 3 0
8 3 0
8 4 0
7 2 0
7 4 2
7 6 2
6 3 1
6 3 1
6 1 0
6 4 1
5 1 1
5 1 2
5 1 0
5 1 0
5 2 0
5 1 1
5 2 1
5 2 1
5 2 1
4 1 1
4 1 0
4 1 0
3 1 1