facebookincubator / fastmod
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 43 units with 951 lines of code in units (85.4% of code).
    • 1 very long units (179 lines of code)
    • 4 long units (247 lines of code)
    • 8 medium size units (240 lines of code)
    • 12 small units (172 lines of code)
    • 18 very small units (113 lines of code)
18% | 25% | 25% | 18% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
rs18% | 25% | 25% | 18% | 11%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src18% | 25% | 25% | 18% | 11%
Alternative Visuals
Longest Units
Top 43 longest units
Unit# linesMcCabe index# params
179 10 0
74 12 8
69 10 6
53 5 6
51 5 5
47 6 2
39 2 2
30 3 0
29 1 0
27 4 0
24 2 7
23 5 2
21 3 3
18 4 1
18 1 0
17 2 1
16 1 5
16 1 0
15 1 0
14 1 0
12 6 3
12 4 2
12 2 1
11 2 2
11 2 3
10 1 0
10 1 0
10 1 0
9 1 0
8 1 0
8 1 3
8 3 1
7 1 0
6 2 2
5 2 3
5 2 2
5 2 0
5 1 0
4 3 1
4 1 2
3 1 0
3 1 1
3 1 0