aws-samples / aws-lambda-redirection-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 60 units with 613 lines of code in units (36.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 2 simple units (64 lines of code)
    • 58 very simple units (549 lines of code)
0% | 0% | 0% | 10% | 89%
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% | 0% | 10% | 89%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lambda/origin-request-function0% | 0% | 0% | 38% | 61%
userinterface/js/contollers0% | 0% | 0% | 0% | 100%
userinterface/js/services0% | 0% | 0% | 0% | 100%
lambda/deploy-function0% | 0% | 0% | 0% | 100%
userinterface/js0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
"": function()
in lambda/origin-request-function/rules.js
38 9 1
"": function()
in lambda/origin-request-function/rules.js
26 8 1
function isRuleValid()
in lambda/origin-request-function/utils.js
15 5 2
vm.addSection = function()
in userinterface/js/contollers/AppController.js
12 4 1
"": function()
in lambda/origin-request-function/rules.js
13 4 1
onSuccess: function()
in userinterface/js/contollers/LoginController.js
12 3 1
exports.handler = function()
in lambda/deploy-function/index.js
26 3 2
function uploadUIAssets()
in lambda/deploy-function/index.js
32 3 1
function syncRedirectionRule()
in lambda/origin-request-function/index.js
25 3 2
function GlobalController()
in userinterface/js/contollers/GlobalController.js
20 2 6
function AppController()
in userinterface/js/contollers/AppController.js
23 2 7
vm.getRules = function()
in userinterface/js/contollers/AppController.js
12 2 1
vm.moveUpRule = function()
in userinterface/js/contollers/AppController.js
9 2 2
vm.moveDownRule = function()
in userinterface/js/contollers/AppController.js
10 2 2
makeCall: function()
in userinterface/js/services/httpService.js
13 2 5
var checkAuth = function()
in userinterface/js/services/httpService.js
4 2 1
var checkSuccess = function()
in userinterface/js/services/httpService.js
4 2 1
getAttr: function()
in userinterface/js/services/tokenService.js
4 2 1
AWSService.prototype.getRules = function()
in userinterface/js/services/awsService.js
2 2 1
(function ()()
in userinterface/js/app.js
12 1 1