facebook / facebook-python-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 2,474 units with 42,322 lines of code in units (67.9% of code).
    • 11 very long units (1,668 lines of code)
    • 50 long units (3,142 lines of code)
    • 1,050 medium size units (32,394 lines of code)
    • 42 small units (589 lines of code)
    • 1,321 very small units (4,529 lines of code)
3% | 7% | 76% | 1% | 10%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py3% | 7% | 76% | 1% | 10%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
facebook_business/adobjects4% | 7% | 79% | <1% | 8%
facebook_business/adobjects/helpers0% | 21% | 11% | 31% | 35%
facebook_business/adobjects/serverside0% | 6% | 27% | 10% | 55%
facebook_business0% | 5% | 30% | 17% | 45%
facebook_business/utils0% | 0% | 0% | 50% | 50%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
335 6 7
186 6 7
166 6 7
148 6 7
148 6 7
130 6 7
113 6 7
112 6 7
111 6 7
110 6 7
109 6 7
88 6 7
86 6 7
82 6 7
82 6 7
82 6 7
82 6 7
80 6 7
77 6 7
72 6 7
71 6 7
70 6 7
69 9 7
67 6 7
66 6 7
65 6 7
65 6 7
65 6 7
62 6 7
62 6 7
61 24 3
61 10 7
61 10 7
61 6 7
61 10 7
61 10 7
60 7 8
60 7 8
60 7 8
60 7 8
59 6 7
58 6 7
58 6 7
58 6 7
58 6 7
56 6 7
55 6 7
55 6 7
55 6 7
54 6 7