facebookincubator / dispenso
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 463 units with 4,161 lines of code in units (53.7% of code).
    • 0 very long units (0 lines of code)
    • 5 long units (351 lines of code)
    • 30 medium size units (815 lines of code)
    • 92 small units (1,331 lines of code)
    • 336 very small units (1,664 lines of code)
0% | 8% | 19% | 31% | 39%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
h0% | 16% | 12% | 23% | 47%
cpp0% | 0% | 26% | 41% | 32%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
dispenso0% | 20% | 15% | 22% | 41%
dispenso/detail0% | 6% | 13% | 23% | 56%
benchmarks0% | 0% | 25% | 43% | 31%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
90 22 6
82 21 4
61 6 1
60 16 5
58 22 3
48 6 6
42 5 4
32 7 1
32 6 1
31 5 2
31 4 1
31 4 1
30 3 1
29 4 1
28 6 3
28 5 1
28 5 1
28 3 1
28 5 1
27 2 1
27 2 1
26 2 6
25 7 1
24 8 2
24 6 1
24 4 4
23 2 6
22 3 7
21 1 2
21 5 0
21 4 1
21 2 1
21 3 1
21 3 1
21 3 1
20 6 2
20 4 1
20 4 1
20 6 3
20 3 3
19 8 1
19 4 1
19 5 2
19 6 1
19 4 3
18 3 2
18 6 2
18 4 2
18 3 5
18 4 2