facebook / prop-types
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 682 lines of code in units (118.6% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 6 medium size units (200 lines of code)
    • 21 small units (324 lines of code)
    • 32 very small units (158 lines of code)
0% | 0% | 29% | 47% | 23%
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% | 29% | 47% | 23%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 0% | 29% | 47% | 23%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
43 16 1
42 12 7
40 14 5
28 1 0
26 7 5
21 1 1
20 1 1
19 1 1
19 6 5
18 1 1
18 5 5
17 1 1
17 5 5
16 1 1
16 1 1
16 4 5
15 1 1
15 6 5
15 6 2
14 1 1
14 6 1
14 6 1
13 1 0
13 4 1
12 2 6
12 2 6
11 1 0
10 1 0
9 3 1
9 3 1
9 2 1
8 1 0
8 2 5
8 2 5
8 3 5
7 4 2
6 5 1
6 2 5
6 2 5
6 3 1
5 2 0
5 3 2
4 1 1
4 2 2
3 1 0
3 1 0
3 1 1
3 1 0
3 1 1
3 1 0