awslabs / aws-amplify-identity-broker
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 59 units with 1,157 lines of code in units (16.5% of code).
    • 2 very long units (237 lines of code)
    • 3 long units (221 lines of code)
    • 11 medium size units (310 lines of code)
    • 16 small units (242 lines of code)
    • 27 very small units (147 lines of code)
20% | 19% | 26% | 20% | 12%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js20% | 19% | 26% | 20% | 12%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/pages/Settings80% | 0% | 0% | 10% | 9%
amplify/backend/function25% | 0% | 37% | 25% | 11%
src/components/Snackbar0% | 100% | 0% | 0% | 0%
src/pages/Logout0% | 100% | 0% | 0% | 0%
src/pages/TermsOfService0% | 64% | 0% | 29% | 6%
src0% | 0% | 83% | 11% | 5%
src/components/ProtectedRoute0% | 0% | 80% | 0% | 19%
src/redux/reducers0% | 0% | 60% | 39% | 0%
src/pages/Dashboard0% | 0% | 40% | 49% | 10%
src/components/LandingPage0% | 0% | 0% | 48% | 51%
src/components/MfaTotpConfigDialog0% | 0% | 0% | 63% | 36%
src/components/ViewPort0% | 0% | 0% | 0% | 100%
src/pages/ErrorPage0% | 0% | 0% | 0% | 100%
src/components/LanguageSelect0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function TabMfaData()
in src/pages/Settings/tabMfaData.js
133 8 1
async function handlePKCE()
in amplify/backend/function/amplifyIdentityBrokerAuthorize/src/index.js
104 14 1
export default function AppSnackbar()
in src/components/Snackbar/Snackbar.js
96 17 1
componentDidMount()
in src/pages/Logout/Logout.js
65 23 0
export default function TosContent()
in src/pages/TermsOfService/content.js
60 3 1
exports.send = function()
in amplify/backend/function/amplifyIdentityBrokerPostDeployment/src/cfn-response.js
39 3 6
async function handleImplicit()
in amplify/backend/function/amplifyIdentityBrokerAuthorize/src/index.js
36 6 1
function I18N()
in amplify/backend/function/amplifyIdentityBrokerCustomMessage/src/custom.js
33 1 0
function registerValidSW()
in src/serviceWorker.js
33 8 2
componentDidMount()
in src/components/ProtectedRoute/ProtectedRoute.js
29 7 0
function checkValidServiceWorker()
in src/serviceWorker.js
25 4 2
export default function()
in src/redux/reducers/user.js
25 5 1
async function injectEnvVariableToLambda()
in amplify/backend/function/amplifyIdentityBrokerPostDeployment/src/index.js
24 1 3
async function updateCognitoAppCallbacks()
in amplify/backend/function/amplifyIdentityBrokerPostDeployment/src/index.js
22 1 3
export function register()
in src/serviceWorker.js
22 5 1
getClients()
in src/pages/Dashboard/Dashboard.js
22 1 0
async function verifyClient()
in amplify/backend/function/amplifyIdentityBrokerAuthorize/src/index.js
20 6 2
async function encryptToken()
in amplify/backend/function/amplifyIdentityBrokerStorage/src/index.js
18 2 1
async function encryptToken()
in amplify/backend/function/amplifyIdentityBrokerAuthorize/src/index.js
18 2 1
function TabPanel()
in src/pages/Settings/content.js
18 2 1