awslabs / aws-crt-php
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 349 units with 2,421 lines of code in units (61.9% of code).
    • 3 very long units (349 lines of code)
    • 4 long units (287 lines of code)
    • 15 medium size units (414 lines of code)
    • 21 small units (303 lines of code)
    • 306 very small units (1,068 lines of code)
14% | 11% | 17% | 12% | 44%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
php16% | 8% | 18% | 11% | 44%
c0% | 33% | 8% | 16% | 41%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT25% | 13% | 24% | 14% | 21%
ext0% | 26% | 6% | 13% | 52%
src/AWS/CRT/Auth0% | 0% | 32% | 10% | 57%
src/AWS/CRT/HTTP0% | 0% | 0% | 25% | 74%
src/AWS/CRT0% | 0% | 0% | 0% | 100%
src/AWS/CRT/IO0% | 0% | 0% | 0% | 100%
src/AWS/CRT/Internal0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
126 27 3
119 36 6
104 17 2
95 24 3
70 20 3
63 12 0
59 12 3
42 6 3
34 13 2
34 7 2
public function __construct()
in src/AWS/CRT/Auth/SigningConfigAWS.php
32 3 1
29 12 0
29 12 0
28 6 1
26 11 2
25 1 11
24 5 1
24 16 1
23 6 0
22 6 0