facebook / facebook-php-business-sdk
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 3,302 units with 42,085 lines of code in units (69.1% of code).
    • 17 very long units (2,424 lines of code)
    • 35 long units (2,241 lines of code)
    • 666 medium size units (17,204 lines of code)
    • 647 small units (11,808 lines of code)
    • 1,937 very small units (8,408 lines of code)
5% | 5% | 40% | 28% | 19%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
php5% | 5% | 40% | 28% | 19%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
FacebookAds/Object5% | 4% | 48% | 30% | 11%
FacebookAds/Object/Fields12% | 12% | 23% | 23% | 28%
FacebookAds/Object/ServerSide6% | 3% | 11% | 14% | 64%
FacebookAds0% | 7% | 18% | 29% | 44%
FacebookAds/Http/Adapter0% | 23% | 0% | 17% | 58%
FacebookAds/Object/BusinessDataAPI0% | 0% | 5% | 21% | 72%
FacebookAds/Http/Exception0% | 0% | 24% | 38% | 37%
FacebookAds/Logger0% | 0% | 19% | 23% | 57%
FacebookAds/Logger/CurlLogger0% | 0% | 24% | 36% | 38%
FacebookAds/Object/Signal0% | 0% | 0% | 9% | 90%
FacebookAds/Http0% | 0% | 0% | 4% | 95%
FacebookAds/Object/CustomAudienceNormalizers0% | 0% | 0% | 0% | 100%
FacebookAds/Enum0% | 0% | 0% | 0% | 100%
FacebookAds/Object/Traits0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
327 2 1
256 1 0
178 2 1
158 2 1
150 1 0
139 2 1
139 2 1
134 1 0
121 2 1
105 1 0
104 2 1
103 47 1
103 2 1
103 2 1
102 1 0
101 2 1
101 2 1
99 1 0
92 1 0
80 2 1
77 2 1
73 2 1
73 2 1
73 2 1
73 2 1
72 2 1
69 2 1
68 1 0
66 1 0
64 2 1
64 1 0
63 2 1
62 1 0
61 2 1
61 1 0
60 30 3
59 19 2
59 1 0
59 1 0
58 1 0
58 2 1
57 2 1
57 2 1
57 2 1
57 2 1
56 1 0
54 2 1
54 2 1
53 2 1
51 2 1