aws-samples / aws-elasticbeanstalk-fullstack-webapp
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 10 units with 150 lines of code in units (27.8% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (113 lines of code)
    • 1 small units (11 lines of code)
    • 5 very small units (26 lines of code)
0% | 0% | 75% | 7% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 0% | 68% | 9% | 22%
ts0% | 0% | 100% | 0% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
userreg-react-beanstalk/src0% | 0% | 87% | 12% | 0%
userreg-api-node-beanstalk/cdk/lib0% | 0% | 100% | 0% | 0%
userreg-react-beanstalk/src/sign-up0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 10 longest units
Unit# linesMcCabe index# params
function registerValidSW()
in userreg-react-beanstalk/src/serviceWorker.js
33 8 2
constructor()
in userreg-api-node-beanstalk/cdk/lib/cdk-stack.ts
33 1 3
function checkValidServiceWorker()
in userreg-react-beanstalk/src/serviceWorker.js
25 4 2
export function register()
in userreg-react-beanstalk/src/serviceWorker.js
22 5 1
export function unregister()
in userreg-react-beanstalk/src/serviceWorker.js
11 2 0
constructor()
in userreg-react-beanstalk/src/sign-up/page.js
7 1 1
handleErrors()
in userreg-react-beanstalk/src/sign-up/page.js
7 2 1
handleNameChange()
in userreg-react-beanstalk/src/sign-up/page.js
4 1 1
handleEmailChange()
in userreg-react-beanstalk/src/sign-up/page.js
4 1 1
handlePhoneChange()
in userreg-react-beanstalk/src/sign-up/page.js
4 1 1