facebookincubator / spark-state
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 68 units with 626 lines of code in units (83.2% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (150 lines of code)
    • 3 medium size units (75 lines of code)
    • 12 small units (157 lines of code)
    • 51 very small units (244 lines of code)
0% | 23% | 11% | 25% | 38%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 23% | 11% | 25% | 38%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 23% | 11% | 25% | 38%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
76 8 0
74 17 5
28 4 2
25 3 2
22 2 2
19 3 3
15 4 1
15 7 1
13 1 2
13 1 2
13 1 2
13 1 2
12 2 1
11 2 0
11 2 2
11 3 1
11 3 4
10 4 0
9 2 1
9 1 1
9 1 1
9 2 4
8 2 4
7 1 2
7 3 3
7 3 2
7 1 2
6 1 0
6 1 0
6 2 2
6 1 4
6 1 2
5 1 1
5 1 1
5 2 1
5 1 1
5 1 3
5 1 3
5 1 3
5 1 4
5 1 4
5 2 1
5 1 1
5 2 3
5 2 1
5 1 1
4 1 4
4 1 0
3 1 1
3 2 3