aws-samples / php-examples-for-aws-lambda
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 15 units with 223 lines of code in units (29.7% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 5 medium size units (128 lines of code)
    • 2 small units (33 lines of code)
    • 8 very small units (62 lines of code)
0% | 0% | 57% | 14% | 27%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
php0% | 0% | 57% | 14% | 27%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
0.6-MVC-to-microservice/src0% | 0% | 60% | 11% | 27%
0.2-Relational-Database-RDS-Proxy-Example/src0% | 0% | 100% | 0% | 0%
0.7-PHP-Lambda-functions-with-Docker-container-images/src0% | 0% | 0% | 77% | 22%
0.1-SimplePhpFunction/src0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 15 longest units
Unit# linesMcCabe index# params
function index()
in 0.6-MVC-to-microservice/src/handlers/update-item/src/index.php
30 1 1
function index()
in 0.2-Relational-Database-RDS-Proxy-Example/src/index.php
28 3 1
function index()
in 0.6-MVC-to-microservice/src/handlers/put-item/src/index.php
26 1 1
function index()
in 0.6-MVC-to-microservice/src/handlers/get-by-id/src/index.php
22 1 1
function index()
in 0.6-MVC-to-microservice/src/handlers/delete-item/src/index.php
22 1 1
function index()
in 0.6-MVC-to-microservice/src/handlers/get-all-items/src/index.php
19 1 1
function APIResponse()
in 0.7-PHP-Lambda-functions-with-Docker-container-images/src/index.php
14 1 1
function APIResponse()
in 0.6-MVC-to-microservice/src/handlers/update-item/src/index.php
9 1 1
function APIResponse()
in 0.6-MVC-to-microservice/src/handlers/get-by-id/src/index.php
9 1 1
function APIResponse()
in 0.6-MVC-to-microservice/src/handlers/get-all-items/src/index.php
9 1 1
function APIResponse()
in 0.6-MVC-to-microservice/src/handlers/delete-item/src/index.php
9 1 1
function APIResponse()
in 0.6-MVC-to-microservice/src/handlers/put-item/src/index.php
9 1 1
function APIResponse()
in 0.1-SimplePhpFunction/src/index.php
9 1 1
function index()
in 0.7-PHP-Lambda-functions-with-Docker-container-images/src/index.php
4 1 1
function index()
in 0.1-SimplePhpFunction/src/index.php
4 1 1