aws-samples / cloudfront-app-with-cognito-auth-at-edge
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 74 units with 685 lines of code in units (72.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (79 lines of code)
    • 8 simple units (151 lines of code)
    • 64 very simple units (455 lines of code)
0% | 0% | 11% | 22% | 66%
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% | 11% | 22% | 66%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib0% | 0% | 15% | 21% | 63%
src0% | 0% | 0% | 25% | 74%
example/src0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
54 21 3
validate()
in lib/token.js
25 11 1
function formatDate()
in lib/util.js
20 9 2
function formatDate()
in lib/util.js
20 9 2
15 9 2
set()
in lib/token.js
24 8 1
parseCredentials()
in lib/credentials.js
15 7 1
get dataCookie()
in lib/index.js
15 7 0
22 7 1
value: prefixUrl()
in lib/index.js
20 6 1
11 5 1
11 5 1
constructor()
in lib/index.js
15 5 3
get function()
in src/index.js
7 5 0
8 4 2
14 4 1
15 4 2
getExpires()
in lib/credentials.js
11 4 1
get()
in lib/credentials.js
16 4 2
send()
in lib/index.js
7 4 3