facebookincubator / offline-conversion-file-uploader
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 92 units with 1,670 lines of code in units (47.0% of code).
    • 4 very long units (571 lines of code)
    • 2 long units (151 lines of code)
    • 15 medium size units (487 lines of code)
    • 11 small units (176 lines of code)
    • 60 very small units (285 lines of code)
34% | 9% | 29% | 10% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js34% | 9% | 29% | 10% | 17%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/utils33% | 10% | 30% | 7% | 16%
src69% | 0% | 0% | 7% | 23%
sse_uploader/src0% | 0% | 43% | 42% | 13%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
263 20 3
104 16 4
103 4 0
101 20 8
87 8 7
64 4 2
48 9 1
42 2 4
38 4 5
37 14 2
36 2 4
32 4 1
32 4 1
32 4 13
31 5 3
30 7 0
30 4 2
27 8 1
27 3 3
24 1 3
21 5 1
19 6 1
19 2 0
19 2 1
19 1 1
18 2 2
17 5 2
16 2 1
13 3 1
13 1 1
12 3 2
11 1 3
10 1 0
10 4 1
10 1 3
9 3 3
9 1 3
9 3 1
9 4 1
9 4 1
9 1 3
9 1 3
7 1 4
7 2 1
7 2 2
7 1 3
7 1 0
7 1 0
6 2 1
6 3 2