amazon-connect / amazon-connect-chat-ui-examples
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 77 units with 1,329 lines of code in units (20.3% 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)
    • 6 simple units (177 lines of code)
    • 71 very simple units (1,152 lines of code)
0% | 0% | 0% | 13% | 86%
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% | 13% | 86%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
cloudformationTemplates/urlPreviewForAsyncChat/js0% | 0% | 0% | 12% | 87%
cloudformationTemplates/asyncCustomerChatUX/js0% | 0% | 0% | 12% | 87%
cloudformationTemplates/startChatContactAPI/js0% | 0% | 0% | 25% | 74%
samTemplates/amazon-connect-interactive-messages-example/interactive-messaging-lex-codehook0% | 0% | 0% | 10% | 89%
customChatWidget/src/containers0% | 0% | 0% | 0% | 100%
customChatWidget/src/providers0% | 0% | 0% | 0% | 100%
customChatWidget/src/views0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function getPreviousContactData()
in cloudformationTemplates/urlPreviewForAsyncChat/js/startChatContact.js
32 8 2
function getPreviousContactData()
in cloudformationTemplates/asyncCustomerChatUX/js/startChatContact.js
32 8 2
function handleRequest()
in samTemplates/amazon-connect-interactive-messages-example/interactive-messaging-lex-codehook/app.js
15 8 1
let uploadFile = function()
in cloudformationTemplates/urlPreviewForAsyncChat/js/websiteHelper.js
32 7 6
let uploadFile = function()
in cloudformationTemplates/asyncCustomerChatUX/js/websiteHelper.js
32 7 6
function startChatContact()
in cloudformationTemplates/startChatContactAPI/js/startChatContact.js
34 6 1
function handleActionResponse()
in samTemplates/amazon-connect-interactive-messages-example/interactive-messaging-lex-codehook/util/user_input_handler.js
24 5 2
function updateS3Notification()
in cloudformationTemplates/urlPreviewForAsyncChat/js/S3NotificationConfiguration.js
39 4 3
function startChatContact()
in cloudformationTemplates/urlPreviewForAsyncChat/js/startChatContact.js
25 4 4
function updateS3Notification()
in cloudformationTemplates/asyncCustomerChatUX/js/S3NotificationConfiguration.js
39 4 3
function startChatContact()
in cloudformationTemplates/asyncCustomerChatUX/js/startChatContact.js
25 4 4
function updatePreviousConnectionData()
in cloudformationTemplates/urlPreviewForAsyncChat/js/startChatContact.js
29 3 2
websiteHelper.prototype.copyWebSiteAssets = function()
in cloudformationTemplates/urlPreviewForAsyncChat/js/websiteHelper.js
28 3 2
function updatePreviousConnectionData()
in cloudformationTemplates/asyncCustomerChatUX/js/startChatContact.js
29 3 2
websiteHelper.prototype.copyWebSiteAssets = function()
in cloudformationTemplates/asyncCustomerChatUX/js/websiteHelper.js
28 3 2
chatSession.incomingItemDecorator = function()
in customChatWidget/src/containers/ChatWidget/index.js
9 3 1
function()
in cloudformationTemplates/urlPreviewForAsyncChat/js/customResourceHelper.js
12 2 2
updateS3Notification()
in cloudformationTemplates/urlPreviewForAsyncChat/js/S3NotificationConfiguration.js
4 2 4
function getReason()
in cloudformationTemplates/urlPreviewForAsyncChat/js/S3NotificationConfiguration.js
6 2 1
metricsHelper.prototype.sendAnonymousMetric = function()
in cloudformationTemplates/urlPreviewForAsyncChat/js/metricsHelper.js
31 2 2