wit-ai / wit-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 473 units with 5,807 lines of code in units (68.3% of code).
    • 3 very long units (398 lines of code)
    • 8 long units (543 lines of code)
    • 60 medium size units (1,765 lines of code)
    • 98 small units (1,436 lines of code)
    • 304 very small units (1,665 lines of code)
6% | 9% | 30% | 24% | 28%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs6% | 9% | 30% | 24% | 28%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Scripts/Runtime/Lib30% | 9% | 20% | 6% | 32%
Scripts/Runtime9% | 12% | 27% | 20% | 30%
Scripts/Editor/CallbackHandlers39% | 0% | 35% | 5% | 19%
Scripts/Editor/Data0% | 12% | 27% | 42% | 17%
Scripts/Editor/Utility0% | 19% | 45% | 14% | 20%
Scripts/Editor0% | 14% | 45% | 6% | 32%
Scripts/Editor/Windows0% | 10% | 28% | 36% | 24%
Scripts/Runtime/CallbackHandlers0% | 0% | 68% | 26% | 5%
Scripts/Runtime/Settings0% | 0% | 48% | 51% | 0%
Scripts/Editor/Inspectors0% | 0% | 59% | 14% | 25%
Scripts/Runtime/Data0% | 0% | 4% | 38% | 56%
Scripts/Runtime/ResponseManager0% | 0% | 66% | 0% | 33%
Scripts/Runtime/Utilities0% | 0% | 17% | 23% | 58%
Scripts/Editor/Lib0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
157 42 1
136 21 1
105 15 3
98 17 1
80 22 0
75 22 3
70 2 0
58 11 0
57 12 4
54 14 0
51 10 1
47 3 3
45 11 3
44 9 3
44 7 0
44 7 3
44 11 4
43 10 1
41 10 0
38 14 0
37 5 1
36 5 0
36 7 2
36 5 0
35 9 1
35 6 1
34 3 6
34 6 2
33 7 1
33 10 0
33 2 2
32 6 1
32 6 2
31 9 1
31 3 1
31 8 0
29 9 1
29 5 1
28 6 1
28 5 3
28 3 3
27 4 4
27 5 2
27 6 4
27 5 2
25 6 3
25 4 0
25 4 3
24 6 1
24 5 0