awslabs / aws-elasticache-cluster-client-memcached-for-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 150 units with 2,919 lines of code in units (52.3% of code).
    • 4 very long units (607 lines of code)
    • 12 long units (763 lines of code)
    • 30 medium size units (1,037 lines of code)
    • 16 small units (225 lines of code)
    • 88 very small units (287 lines of code)
20% | 26% | 35% | 7% | 9%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c21% | 26% | 36% | 7% | 8%
php0% | 0% | 0% | 15% | 84%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
fastlz92% | 0% | 0% | 0% | 7%
ROOT11% | 29% | 40% | 8% | 10%
server-example0% | 0% | 0% | 73% | 26%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
192 44 3
181 4 1
int php_memc_set_option()
in php_memcached.c
121 25 3
113 20 4
static PHP_METHOD()
in php_memcached.c
90 20 2
81 18 3
80 24 6
71 12 3
62 17 3
57 7 4
56 10 4
void s_handle_memcached_event()
in php_memcached_server.c
55 9 3
zend_bool s_configure_from_ini_values()
in php_memcached_session.c
54 16 2
53 6 4
53 5 2
51 8 6
void php_memc_get_impl()
in php_memcached.c
50 7 2
49 7 3
47 5 2
static PHP_METHOD()
in php_memcached.c
47 12 2