awslabs / aws-amplify-identity-broker
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 59 units with 1,157 lines of code in units (16.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (265 lines of code)
    • 6 simple units (267 lines of code)
    • 50 very simple units (625 lines of code)
0% | 0% | 22% | 23% | 54%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
js0% | 0% | 22% | 23% | 54%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
amplify/backend/function0% | 0% | 25% | 17% | 56%
src/components/Snackbar0% | 0% | 100% | 0% | 0%
src/pages/Logout0% | 0% | 100% | 0% | 0%
src/pages/Settings0% | 0% | 0% | 80% | 19%
src0% | 0% | 0% | 34% | 65%
src/components/ProtectedRoute0% | 0% | 0% | 80% | 19%
src/pages/TermsOfService0% | 0% | 0% | 0% | 100%
src/components/LandingPage0% | 0% | 0% | 0% | 100%
src/pages/Dashboard0% | 0% | 0% | 0% | 100%
src/redux/reducers0% | 0% | 0% | 0% | 100%
src/components/MfaTotpConfigDialog0% | 0% | 0% | 0% | 100%
src/components/ViewPort0% | 0% | 0% | 0% | 100%
src/pages/ErrorPage0% | 0% | 0% | 0% | 100%
src/components/LanguageSelect0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
componentDidMount()
in src/pages/Logout/Logout.js
65 23 0
export default function AppSnackbar()
in src/components/Snackbar/Snackbar.js
96 17 1
async function handlePKCE()
in amplify/backend/function/amplifyIdentityBrokerAuthorize/src/index.js
104 14 1
function registerValidSW()
in src/serviceWorker.js
33 8 2
function TabMfaData()
in src/pages/Settings/tabMfaData.js
133 8 1
componentDidMount()
in src/components/ProtectedRoute/ProtectedRoute.js
29 7 0
async function getCookiesFromHeader()
in amplify/backend/function/amplifyIdentityBrokerAuthorize/src/index.js
16 6 1
async function verifyClient()
in amplify/backend/function/amplifyIdentityBrokerAuthorize/src/index.js
20 6 2
async function handleImplicit()
in amplify/backend/function/amplifyIdentityBrokerAuthorize/src/index.js
36 6 1
I18N.prototype.setLanguage = function()
in amplify/backend/function/amplifyIdentityBrokerCustomMessage/src/custom.js
13 5 1
export function register()
in src/serviceWorker.js
22 5 1
export default function()
in src/redux/reducers/app.js
16 5 2
export default function()
in src/redux/reducers/user.js
25 5 1
function checkValidServiceWorker()
in src/serviceWorker.js
25 4 2
function getStepContent()
in src/components/MfaTotpConfigDialog/MfaTotpConfigDialog.js
12 4 1
export function getCookie()
in src/components/LandingPage/helpers/cookieHelper.js
10 4 1
async function handleIdpLogin()
in src/components/LandingPage/helpers/handleIdpLogin.js
16 4 1
componentDidMount()
in src/pages/TermsOfService/TermsOfService.js
6 4 0
exports.send = function()
in amplify/backend/function/amplifyIdentityBrokerPostDeployment/src/cfn-response.js
39 3 6
export function setCookie()
in src/components/LandingPage/helpers/cookieHelper.js
8 3 3