whatsapp / stickers
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 224 units with 2,687 lines of code in units (27.7% of code).
    • 1 very long units (101 lines of code)
    • 8 long units (533 lines of code)
    • 20 medium size units (634 lines of code)
    • 41 small units (589 lines of code)
    • 154 very small units (830 lines of code)
3% | 19% | 23% | 21% | 30%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
m10% | 41% | 16% | 14% | 16%
java0% | 11% | 30% | 24% | 34%
swift0% | 0% | 23% | 31% | 44%
h0% | 0% | 0% | 24% | 75%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
iOS/WAStickersThirdParty7% | 29% | 18% | 19% | 24%
Android/app/src/main/java/com0% | 11% | 30% | 24% | 34%
iOS/WebP.framework/Headers0% | 0% | 0% | 16% | 83%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
101 32 5
98 29 3
83 23 1
70 32 2
64 26 4
57 23 5
56 22 1
54 22 4
51 12 3
41 17 2
41 3 1
40 18 3
39 11 1
37 10 3
36 5 1
36 4 2
35 13 4
33 9 3
33 5 1
32 8 1
30 4 2
29 4 1
29 9 1
28 5 2
24 6 1
24 2 1
23 3 2
22 6 2
22 8 2
20 7 4
20 3 2
20 5 3
18 5 8
18 5 7
18 6 3
18 1 1
18 4 2
17 3 1
17 2 1
17 2 1
17 6 1
16 4 1
16 4 2
16 4 0
15 6 0
14 2 2
14 2 3
14 2 2
13 1 2
13 9 1