aws-samples / alexa-skill-with-sap-data-and-scp
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 26 units with 379 lines of code in units (76.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (79 lines of code)
    • 1 simple units (32 lines of code)
    • 24 very simple units (268 lines of code)
0% | 0% | 20% | 8% | 70%
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% | 20% | 8% | 70%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
scp-odata-proxy-api/odataproxyapi0% | 0% | 54% | 0% | 45%
alexa/lambda/lib/functions/aws-sap-alexa-scp-solo0% | 0% | 0% | 15% | 84%
alexa/lambda/lib0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
async function proxyToBackend()
in scp-odata-proxy-api/odataproxyapi/start.js
79 11 3
function getDataFromSAP()
in alexa/lambda/lib/functions/aws-sap-alexa-scp-solo/index.js
32 6 6
function getDestinationDetails()
in scp-odata-proxy-api/odataproxyapi/start.js
25 4 2
function getToken()
in scp-odata-proxy-api/odataproxyapi/start.js
31 4 3
function filterAllowedHeaders()
in scp-odata-proxy-api/odataproxyapi/start.js
8 3 2
canHandle()
in alexa/lambda/lib/functions/aws-sap-alexa-scp-solo/index.js
5 3 1
canHandle()
in alexa/lambda/lib/functions/aws-sap-alexa-scp-solo/index.js
4 2 1
async handle()
in alexa/lambda/lib/functions/aws-sap-alexa-scp-solo/index.js
29 2 1
canHandle()
in alexa/lambda/lib/functions/aws-sap-alexa-scp-solo/index.js
4 2 1
canHandle()
in alexa/lambda/lib/functions/aws-sap-alexa-scp-solo/index.js
4 2 1
canHandle()
in alexa/lambda/lib/functions/aws-sap-alexa-scp-solo/index.js
4 2 1
function cloneObject()
in scp-odata-proxy-api/odataproxyapi/start.js
3 1 1
constructor()
in alexa/lambda/lib/lambda-stack.js
30 1 3
async handle()
in alexa/lambda/lib/functions/aws-sap-alexa-scp-solo/index.js
14 1 1
async handle()
in alexa/lambda/lib/functions/aws-sap-alexa-scp-solo/index.js
41 1 1
function getCsrfToken()
in alexa/lambda/lib/functions/aws-sap-alexa-scp-solo/index.js
13 1 1
canHandle()
in alexa/lambda/lib/functions/aws-sap-alexa-scp-solo/index.js
3 1 1
handle()
in alexa/lambda/lib/functions/aws-sap-alexa-scp-solo/index.js
7 1 1
handle()
in alexa/lambda/lib/functions/aws-sap-alexa-scp-solo/index.js
7 1 1
handle()
in alexa/lambda/lib/functions/aws-sap-alexa-scp-solo/index.js
6 1 1