facebook / FBRetainCycleDetector
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 36 units with 442 lines of code in units (12.9% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (160 lines of code)
    • 1 medium size units (21 lines of code)
    • 13 small units (171 lines of code)
    • 19 very small units (90 lines of code)
0% | 36% | 4% | 38% | 20%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c0% | 60% | 11% | 25% | 2%
mm0% | 25% | 0% | 48% | 25%
m0% | 0% | 0% | 57% | 42%
h0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
rcd_fishhook0% | 60% | 11% | 25% | 2%
FBRetainCycleDetector/Layout/Classes0% | 38% | 0% | 27% | 34%
FBRetainCycleDetector/Associations0% | 0% | 0% | 68% | 31%
FBRetainCycleDetector/Filtering0% | 0% | 0% | 89% | 10%
FBRetainCycleDetector/Layout/Blocks0% | 0% | 0% | 65% | 35%
FBRetainCycleDetector0% | 0% | 0% | 100% | 0%
FBRetainCycleDetector/Graph0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 36 longest units
Unit# linesMcCabe index# params
54 17 6
53 18 3
53 11 2
21 2 1
18 3 3
15 4 2
15 3 3
14 4 2
13 2 4
13 3 0
13 1 2
12 3 1
12 3 4
12 5 1
12 2 1
11 3 3
11 3 4
10 2 1
10 2 1
7 2 2
7 1 1
7 2 1
7 1 1
6 1 2
5 1 1
4 1 2
4 1 0
4 1 2
4 1 2
3 1 2
3 1 1
3 1 0
3 1 1
1 1 2
1 1 1
1 1 0