facebook / react-native-deprecated-modules
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 104 units with 1,357 lines of code in units (37.5% of code).
    • 1 very long units (127 lines of code)
    • 5 long units (341 lines of code)
    • 6 medium size units (155 lines of code)
    • 22 small units (328 lines of code)
    • 70 very small units (406 lines of code)
9% | 25% | 11% | 24% | 29%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js9% | 25% | 11% | 24% | 29%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
deprecated-react-native-listview15% | 9% | 16% | 27% | 31%
deprecated-react-native-ios-mapview0% | 76% | 0% | 15% | 7%
deprecated-react-native-prop-types0% | 38% | 8% | 22% | 31%
deprecated-react-native-swipeablelistview0% | 0% | 0% | 25% | 74%
deprecated-react-native-ios-adsupport0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
127 22 0
83 25 1
77 29 1
76 22 0
53 8 6
52 8 6
31 4 0
30 10 1
26 4 3
25 11 1
22 1 2
21 4 1
20 2 0
19 3 4
18 1 2
18 1 2
18 7 1
17 4 1
17 6 1
17 6 0
16 5 1
16 5 1
14 1 2
14 5 0
14 5 0
14 1 2
13 1 0
13 3 2
12 3 1
12 4 1
12 4 1
12 2 0
11 1 0
11 2 1
10 1 2
10 2 0
10 4 2
10 4 1
10 6 1
10 2 0
10 5 0
10 1 2
10 2 2
9 1 0
9 4 0
9 1 0
9 4 0
9 1 1
8 2 1
8 1 0