facebook / facebook-nodejs-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 1,294 units with 13,956 lines of code in units (50.3% of code).
    • 9 very long units (1,745 lines of code)
    • 24 long units (1,592 lines of code)
    • 95 medium size units (2,701 lines of code)
    • 195 small units (2,816 lines of code)
    • 971 very small units (5,102 lines of code)
12% | 11% | 19% | 20% | 36%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js12% | 11% | 19% | 20% | 36%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/objects14% | 12% | 21% | 22% | 29%
ROOT0% | 100% | 0% | 0% | 0%
src/objects/serverside0% | 7% | 0% | 4% | 88%
src0% | 0% | 30% | 29% | 40%
src/objects/signal0% | 0% | 4% | 3% | 91%
src/objects/businessdataapi0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
256 1 0
256 1 0
255 1 0
255 1 0
209 1 0
150 1 0
134 1 0
125 1 0
105 1 0
93 1 0
86 1 0
83 1 0
80 1 0
75 1 0
71 1 0
71 1 0
71 1 0
66 1 0
65 1 0
65 1 0
65 1 0
64 1 0
62 1 0
61 4 5
61 1 0
59 1 0
59 1 0
59 1 0
58 1 0
58 1 0
56 1 0
53 19 2
51 1 0
49 1 0
48 1 0
45 1 0
44 4 1
42 1 0
42 1 0
41 1 0
40 1 0
39 1 0
39 1 0
39 1 0
38 1 0
37 1 0
35 1 0
35 1 0
35 1 0
34 1 0