awslabs / aws-amplify-identity-broker-client
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 13 units with 191 lines of code in units (43.9% 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)
    • 1 small units (12 lines of code)
    • 7 very small units (51 lines of code)
0% | 0% | 67% | 6% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
tsx0% | 0% | 67% | 6% | 26%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 0% | 77% | 0% | 22%
src/HomePage0% | 0% | 67% | 0% | 32%
src/NavBar0% | 0% | 0% | 57% | 42%
Alternative Visuals
Longest Units
Top 13 longest units
Unit# linesMcCabe index# params
function registerValidSW()
in src/serviceWorker.tsx
33 8 2
render()
in src/HomePage/index.tsx
25 3 0
25 7 1
function checkValidServiceWorker()
in src/serviceWorker.tsx
23 4 2
export function register()
in src/serviceWorker.tsx
22 5 1
render()
in src/NavBar/index.tsx
12 3 0
_isAuthenticated()
in src/App.tsx
10 4 1
constructor()
in src/HomePage/index.tsx
9 1 1
constructor()
in src/NavBar/index.tsx
9 1 1
export function unregister()
in src/serviceWorker.tsx
7 2 0
constructor()
in src/App.tsx
7 2 1
6 3 0
async componentDidMount()
in src/HomePage/index.tsx
3 1 0