facebookincubator / Facebook-Pixel-for-Wordpress
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 237 units with 2,921 lines of code in units (48.9% of code).
    • 1 very long units (122 lines of code)
    • 1 long units (54 lines of code)
    • 39 medium size units (1,042 lines of code)
    • 71 small units (1,041 lines of code)
    • 125 very small units (662 lines of code)
4% | 1% | 35% | 35% | 22%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
php4% | 2% | 35% | 35% | 21%
js0% | 0% | 35% | 32% | 32%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
core10% | 4% | 33% | 28% | 24%
integration0% | 0% | 39% | 43% | 17%
js/lib0% | 0% | 35% | 32% | 32%
ROOT0% | 0% | 0% | 52% | 47%
task0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
122 21 5
54 8 0
45 13 1
42 1 0
37 1 0
36 1 0
35 5 4
35 13 2
34 11 0
33 7 3
31 7 1
30 5 0
30 5 0
29 1 0
29 4 1
28 3 1
26 7 2
26 3 4
25 1 3
25 3 1
25 3 2
24 2 1
23 5 0
23 3 1
23 5 2
23 3 3
22 3 0
22 6 2
22 5 1
22 7 1
22 7 1
22 2 1
22 6 0
22 4 1
22 4 1
22 2 0
21 4 0
21 5 1
21 5 0
21 3 1
21 4 0
20 1 2
20 4 2
20 4 3
20 3 2
20 2 0
20 2 1
19 7 0
19 4 2
19 3 1