aws-samples / webauthn-with-amazon-cognito
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 233 units with 4,125 lines of code in units (71.7% of code).
    • 1 very complex units (1,063 lines of code)
    • 0 complex units (0 lines of code)
    • 19 medium complex units (833 lines of code)
    • 16 simple units (528 lines of code)
    • 197 very simple units (1,701 lines of code)
25% | 0% | 20% | 12% | 41%
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
js25% | 0% | 20% | 12% | 41%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
public26% | 0% | 20% | 12% | 41%
aws0% | 0% | 0% | 50% | 50%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
var CognitoUser = function()
in public/amazon-cognito-identity.js
1063 152 0
function utf8Slice()
in public/amazon-cognito-identity.js
66 24 3
function byteLength()
in public/amazon-cognito-identity.js
41 23 2
function slowToString()
in public/amazon-cognito-identity.js
49 22 3
function utf8ToBytes()
in public/amazon-cognito-identity.js
60 22 2
function arrayIndexOf()
in public/amazon-cognito-identity.js
44 20 5
function bidirectionalIndexOf()
in public/amazon-cognito-identity.js
44 19 5
function bnpDivRemTo()
in public/amazon-cognito-identity.js
64 19 3
function bnModPow()
in public/amazon-cognito-identity.js
71 19 3
exports.write = function()
in public/amazon-cognito-identity.js
45 17 6
var AuthenticationHelper = function()
in public/amazon-cognito-identity.js
123 16 0
function bnToString()
in public/amazon-cognito-identity.js
32 15 1
var subInit = WordArray.init = function()
in public/amazon-cognito-identity.js
27 13 1
function bnpFromString()
in public/amazon-cognito-identity.js
25 13 2
fetch()
in public/amazon-cognito-identity.js
47 13 2
function get()
in public/amazon-cognito-identity.js
30 13 2
function fromArrayBuffer()
in public/amazon-cognito-identity.js
25 11 4
function fromObject()
in public/amazon-cognito-identity.js
24 11 2
8 11 3
8 11 3