aws-samples / aws-saas-factory-bootcamp
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 140 units with 2,942 lines of code in units (25.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (80 lines of code)
    • 3 simple units (83 lines of code)
    • 136 very simple units (2,779 lines of code)
0% | 0% | 2% | 2% | 94%
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% | 2% | 2% | 94%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source/shared-modules0% | 0% | 13% | 0% | 86%
source/web-client0% | 0% | 0% | 6% | 93%
source/user-manager0% | 0% | 0% | 1% | 98%
source/tenant-registration0% | 0% | 0% | 0% | 100%
source/auth-manager0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
module.exports.configure = function()
in source/shared-modules/config-helper/config.js
80 11 1
function getUserFromCognitoUser()
in source/user-manager/cognito-user.js
26 7 2
$rootScope.isLinkEnabled = function()
in source/web-client/app/scripts/app.js
21 7 1
$scope.formSubmit = function()
in source/web-client/app/scripts/controllers/confirm.js
36 6 0
function tenantExists()
in source/tenant-registration/server.js
21 5 2
module.exports.getCredentialsFromToken = function()
in source/shared-modules/token-manager/token-manager.js
25 5 2
module.exports.getPolicyTemplate = function()
in source/user-manager/cognito-user.js
25 5 2
function lookupUserPoolData()
in source/user-manager/server.js
42 5 5
$rootScope.roleToDisplayName = function()
in source/web-client/app/scripts/app.js
12 5 1
module.exports.getUserPool = function()
in source/shared-modules/token-manager/token-manager.js
22 4 2
module.exports.getInfra = function()
in source/shared-modules/token-manager/token-manager.js
23 4 2
module.exports.getSystemCredentials = function()
in source/shared-modules/token-manager/token-manager.js
25 4 1
DynamoDBHelper.prototype.createTable = function()
in source/shared-modules/dynamodb-helper/dynamodb-helper.js
28 4 2
DynamoDBHelper.prototype.getDynamoDB = function()
in source/shared-modules/dynamodb-helper/dynamodb-helper.js
25 4 2
DynamoDBHelper.prototype.getDynamoDBDocumentClient = function()
in source/shared-modules/dynamodb-helper/dynamodb-helper.js
26 4 2
module.exports.updateUserEnabledStatus = function()
in source/user-manager/cognito-user.js
33 4 4
function registerTenantAdmin()
in source/tenant-registration/server.js
31 3 1
function saveTenantData()
in source/tenant-registration/server.js
35 3 1
module.exports.getTenantId = function()
in source/shared-modules/token-manager/token-manager.js
12 3 1
module.exports.extractTokenData = function()
in source/shared-modules/token-manager/token-manager.js
12 3 1