instagram / ig-json-parser
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 255 units with 2,980 lines of code in units (55.3% of code).
    • 3 very long units (520 lines of code)
    • 5 long units (377 lines of code)
    • 26 medium size units (812 lines of code)
    • 31 small units (465 lines of code)
    • 190 very small units (806 lines of code)
17% | 12% | 27% | 15% | 27%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java17% | 12% | 27% | 15% | 25%
kt0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
processor/src/main30% | 21% | 19% | 9% | 18%
javawriter/src/main0% | 0% | 39% | 28% | 32%
util/testprocessor/src0% | 0% | 71% | 13% | 15%
util/src/main0% | 0% | 40% | 30% | 28%
processor/testuut/parent0% | 0% | 0% | 37% | 62%
processor/testuut/src0% | 0% | 0% | 31% | 68%
processor/testuut/kotlin0% | 0% | 0% | 0% | 100%
processor/support/src0% | 0% | 0% | 0% | 100%
processor/testuut/strict0% | 0% | 0% | 0% | 100%
common/src/main0% | 0% | 0% | 0% | 100%
jitpack-example/src/main0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
244 16 1
172 19 2
104 16 1
87 22 4
86 1 0
82 12 1
71 14 1
51 9 2
49 21 2
48 11 5
46 10 2
45 7 2
38 10 1
35 11 1
34 4 2
34 9 1
33 7 3
33 5 5
32 5 5
31 5 2
29 3 1
29 1 4
28 3 1
28 5 3
27 6 1
26 4 2
26 4 0
25 5 3
24 4 1
24 4 1
24 7 1
22 1 12
21 6 3
21 7 1
20 3 4
20 12 1
20 12 1
18 1 0
18 4 2
18 3 2
17 4 1
17 4 1
17 3 2
17 1 4
16 3 1
16 4 1
15 6 1
15 4 1
15 4 1
15 3 4