aws-samples / amazon-rekognition-id-verification-sample-with-amplify
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 120 units with 1,901 lines of code in units (36.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (287 lines of code)
    • 11 simple units (471 lines of code)
    • 106 very simple units (1,143 lines of code)
0% | 0% | 15% | 24% | 60%
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%
tsx0% | 0% | 17% | 47% | 34%
ts0% | 0% | 0% | 9% | 90%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
amplify/backend0% | 0% | 22% | 23% | 54%
components0% | 0% | 17% | 47% | 34%
common0% | 0% | 0% | 47% | 52%
src/graphql0% | 0% | 0% | 0% | 100%
pages/api0% | 0% | 0% | 0% | 100%
infra/lib0% | 0% | 0% | 0% | 100%
pages0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
registerNewUserWithIdCard: async function()
in amplify/backend/function/idvworkflowfn/src/idvfunctions.js
125 16 3
function reducer()
in components/register-new-user-with-idcard.tsx
74 15 2
registerNewUser: async function()
in amplify/backend/function/idvworkflowfn/src/idvfunctions.js
88 11 1
updateExistingUserPhoto: async function()
in amplify/backend/function/idvworkflowfn/src/idvfunctions.js
59 10 2
deleteUser: async function()
in amplify/backend/function/idvworkflowfn/src/idvfunctions.js
61 10 1
function reducer()
in components/register-new-user.tsx
48 10 2
loginUser: async function()
in amplify/backend/function/idvworkflowfn/src/idvfunctions.js
46 8 1
49 8 2
function validateFields()
in components/register-new-user-with-idcard.tsx
11 7 1
validateDetectFacesResponse: function()
in amplify/backend/function/idvworkflowfn/src/validateidvflows.js
27 6 1
deleteCollection: async function()
in amplify/backend/function/idvworkflowfn/src/idvfunctions.js
31 6 1
async function submitUser()
in components/register-new-user-with-idcard.tsx
63 6 2
function validateFields()
in components/register-new-user.tsx
10 6 1
async function submitUser()
in components/register-new-user.tsx
66 6 2
async function updateUserInfo()
in amplify/backend/function/idvworkflowfn/src/idvfunctions.js
31 5 4
async function fetchTextInCard()
in components/register-new-user-with-idcard.tsx
27 5 3
validateDuplicateCheck: function()
in amplify/backend/function/idvworkflowfn/src/validateidvflows.js
17 4 1
validateFaceComparison: function()
in amplify/backend/function/idvworkflowfn/src/validateidvflows.js
17 4 1
detectTextInIdCard: async function()
in amplify/backend/function/idvworkflowfn/src/idvfunctions.js
27 4 1
createCachedCollection: async function()
in amplify/backend/function/idvworkflowfn/src/graphqlhelpers.js
24 4 1