facebookincubator / dcrpm
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 47 units with 778 lines of code in units (70.0% of code).
    • 1 very long units (132 lines of code)
    • 2 long units (184 lines of code)
    • 4 medium size units (111 lines of code)
    • 13 small units (197 lines of code)
    • 27 very small units (154 lines of code)
16% | 23% | 14% | 25% | 19%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py16% | 23% | 14% | 25% | 19%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
dcrpm16% | 23% | 14% | 25% | 19%
Alternative Visuals
Longest Units
Top 47 longest units
Unit# linesMcCabe index# params
132 18 1
93 1 0
91 22 1
36 10 2
31 6 0
23 8 1
21 6 1
19 4 1
18 4 1
18 4 1
17 5 1
17 4 3
15 5 1
14 4 2
14 2 1
14 5 2
14 3 2
13 5 1
13 3 1
11 8 2
10 4 0
10 1 0
9 2 1
9 2 1
8 3 1
8 2 1
8 1 1
8 2 1
7 2 1
6 1 0
6 3 3
6 2 1
6 3 1
5 1 3
5 1 3
5 2 1
5 2 1
5 3 1
4 1 4
4 1 1
4 3 1
3 1 0
3 2 3
3 1 3
3 2 2
2 1 2
2 1 0