facebook / facebook-sdk-for-unity
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 1,351 units with 13,809 lines of code in units (62.5% of code).
    • 1 very long units (110 lines of code)
    • 21 long units (1,339 lines of code)
    • 118 medium size units (3,542 lines of code)
    • 257 small units (3,621 lines of code)
    • 954 very small units (5,197 lines of code)
<1% | 9% | 25% | 26% | 37%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs<1% | 9% | 22% | 26% | 39%
java0% | 12% | 45% | 21% | 20%
mm0% | 0% | 32% | 30% | 36%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Facebook.Unity1% | 6% | 19% | 29% | 42%
Facebook.Unity.Editor0% | 12% | 26% | 23% | 37%
facebook-android-wrapper0% | 12% | 45% | 21% | 20%
Facebook.Unity.Windows0% | 14% | 28% | 31% | 25%
Facebook.Unity.Canvas0% | 13% | 27% | 9% | 48%
Facebook.Unity.IOS0% | 17% | 16% | 27% | 38%
UnitySDK0% | 0% | 32% | 30% | 36%
Facebook.Unity.Settings0% | 0% | 0% | 0% | 100%
Facebook.Unity.Android0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
110 9 11
94 1 2
86 14 2
77 12 0
74 9 0
72 10 0
68 16 0
67 5 1
65 5 2
65 16 0
62 8 1
59 10 1
58 18 0
57 2 0
57 13 0
56 7 8
56 3 0
56 3 0
54 6 4
52 11 4
52 12 0
52 7 2
50 7 2
50 7 1
49 5 1
48 7 10
44 19 1
44 10 0
43 15 4
43 35 2
43 11 10
43 4 10
42 2 0
41 5 3
41 5 10
41 6 1
41 7 1
40 9 0
40 6 1
39 5 1
38 19 2
38 10 0
37 6 0
37 2 0
37 2 14
37 2 10
36 12 0
36 2 1
36 3 1
36 2 1