microsoft / msphpsql
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 505 units with 10,856 lines of code in units (52.9% of code).
    • 16 very long units (2,191 lines of code)
    • 38 long units (2,522 lines of code)
    • 91 medium size units (2,944 lines of code)
    • 122 small units (1,789 lines of code)
    • 238 very small units (1,410 lines of code)
20% | 23% | 27% | 16% | 12%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cpp23% | 26% | 27% | 14% | 7%
h0% | 5% | 17% | 25% | 51%
py0% | 0% | 48% | 32% | 19%
hpp0% | 0% | 0% | 42% | 57%
php0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source21% | 24% | 26% | 15% | 12%
buildscripts0% | 0% | 48% | 32% | 19%
sample0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
184 44 3
184 34 2
160 54 3
144 27 2
143 43 3
142 37 4
135 28 5
129 27 4
127 34 1
125 28 5
124 29 3
122 13 4
121 32 5
120 27 2
120 32 5
111 16 2
97 35 4
95 34 4
85 23 8
80 11 4
80 16 1
78 16 3
75 32 3
75 29 3
75 16 5
74 32 3
73 10 3
71 9 1
71 15 1
70 11 7
70 9 2
68 17 5
67 15 3
67 13 2
65 13 1
65 8 3
64 21 9
64 16 0
63 8 1
61 21 5
60 9 4
58 6 2
58 9 3
57 9 1
57 19 2
55 15 4
55 14 3
55 11 4
55 15 7
53 9 2