facebook / shimmer-android
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 78 units with 627 lines of code in units (63.5% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (100 lines of code)
    • 4 medium size units (120 lines of code)
    • 7 small units (107 lines of code)
    • 66 very small units (300 lines of code)
0% | 15% | 19% | 17% | 47%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java0% | 16% | 19% | 15% | 48%
kt0% | 0% | 0% | 57% | 42%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
shimmer/src/main/java/com/facebook/shimmer0% | 16% | 19% | 15% | 48%
sample/src/main/java/com/facebook/shimmer/sample0% | 0% | 0% | 57% | 42%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
100 25 1
40 9 1
35 9 0
24 4 0
21 1 1
19 4 2
17 3 0
17 3 0
15 1 1
15 5 2
13 3 1
11 3 1
9 6 0
9 3 1
8 4 1
7 1 2
7 2 1
7 2 1
7 2 1
7 2 1
7 2 1
7 2 1
7 2 1
7 2 1
7 2 1
7 2 1
6 1 1
6 1 5
6 2 1
5 4 0
5 3 0
5 4 0
5 1 2
5 1 2
5 1 0
5 1 4
5 1 0
4 1 0
4 1 0
4 1 2
4 1 1
4 1 1
4 1 1
4 1 1
4 1 1
4 1 1
4 1 1
4 1 1
4 1 1
4 1 1