facebookincubator / reactor-extension-facebook-pixel
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 34 units with 252 lines of code in units (25.5% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (26 lines of code)
    • 2 small units (31 lines of code)
    • 31 very small units (195 lines of code)
0% | 0% | 10% | 12% | 77%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 0% | 10% | 12% | 77%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/view/actions/sendCustomEventComponents0% | 0% | 40% | 18% | 40%
src/lib/actions0% | 0% | 0% | 20% | 79%
src/view/__tests_helpers__0% | 0% | 0% | 0% | 100%
src/lib/helpers0% | 0% | 0% | 0% | 100%
src/view/configuration/components0% | 0% | 0% | 0% | 100%
src/view/actions/sendSearchEventComponents0% | 0% | 0% | 0% | 100%
src/view/actions/valueCurrencyComponents0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 34 longest units
Unit# linesMcCabe index# params
26 8 1
19 2 1
12 4 1
10 2 1
10 2 1
10 2 1
10 1 1
9 3 1
9 2 1
9 1 1
9 1 1
9 1 1
9 1 1
8 2 1
8 1 0
7 2 1
7 2 1
7 2 1
7 1 1
7 1 1
7 1 0
5 1 0
5 1 0
5 1 0
5 2 0
3 1 1
3 1 1
3 1 1
3 1 1
3 1 0
3 1 0
2 1 2
2 1 2
1 1 2