facebook / pcicrawler
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 61 units with 694 lines of code in units (64.3% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (58 lines of code)
    • 11 medium size units (305 lines of code)
    • 10 small units (155 lines of code)
    • 39 very small units (176 lines of code)
0% | 8% | 43% | 22% | 25%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 8% | 43% | 22% | 25%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
pcicrawler0% | 50% | 29% | 12% | 8%
pci_lib0% | 0% | 47% | 24% | 28%
pci_vpd_lib0% | 0% | 42% | 24% | 32%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
58 21 3
50 13 0
34 12 4
31 11 0
30 10 2
25 6 1
24 6 2
24 7 1
23 7 2
22 5 1
21 8 2
21 4 1
19 6 1
18 3 1
17 2 2
17 6 2
17 2 1
17 6 2
14 4 1
12 4 1
12 6 1
12 4 0
10 8 2
9 4 1
8 2 1
8 2 1
8 2 1
7 2 0
7 3 2
7 3 1
7 2 1
7 1 1
7 2 2
6 1 0
6 2 1
5 2 3
5 2 1
5 3 2
4 1 2
4 2 2
4 1 1
4 2 2
4 2 3
3 1 0
3 1 2
3 1 2
3 1 2
3 1 2
3 2 1
3 1 1