amazon-connect / amazon-connect-chat-ui-examples
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 77 units with 1,329 lines of code in units (20.3% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 29 medium size units (868 lines of code)
    • 18 small units (258 lines of code)
    • 30 very small units (203 lines of code)
0% | 0% | 65% | 19% | 15%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 0% | 65% | 19% | 15%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
cloudformationTemplates/urlPreviewForAsyncChat/js0% | 0% | 69% | 13% | 17%
cloudformationTemplates/asyncCustomerChatUX/js0% | 0% | 69% | 13% | 17%
cloudformationTemplates/startChatContactAPI/js0% | 0% | 75% | 25% | 0%
samTemplates/amazon-connect-interactive-messages-example/interactive-messaging-lex-codehook0% | 0% | 32% | 61% | 5%
customChatWidget/src/containers0% | 0% | 0% | 0% | 100%
customChatWidget/src/providers0% | 0% | 0% | 0% | 100%
customChatWidget/src/views0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function updateS3Notification()
in cloudformationTemplates/urlPreviewForAsyncChat/js/S3NotificationConfiguration.js
39 4 3
function updateS3Notification()
in cloudformationTemplates/asyncCustomerChatUX/js/S3NotificationConfiguration.js
39 4 3
let sendResponse = function()
in cloudformationTemplates/urlPreviewForAsyncChat/js/customResourceHelper.js
34 1 5
let sendResponse = function()
in cloudformationTemplates/asyncCustomerChatUX/js/customResourceHelper.js
34 1 5
let sendResponse = function()
in cloudformationTemplates/startChatContactAPI/js/customResourceHelper.js
34 1 5
function startChatContact()
in cloudformationTemplates/startChatContactAPI/js/startChatContact.js
34 6 1
function getPreviousContactData()
in cloudformationTemplates/urlPreviewForAsyncChat/js/startChatContact.js
32 8 2
let uploadFile = function()
in cloudformationTemplates/urlPreviewForAsyncChat/js/websiteHelper.js
32 7 6
function getPreviousContactData()
in cloudformationTemplates/asyncCustomerChatUX/js/startChatContact.js
32 8 2
let uploadFile = function()
in cloudformationTemplates/asyncCustomerChatUX/js/websiteHelper.js
32 7 6
function sendResponse()
in cloudformationTemplates/urlPreviewForAsyncChat/js/S3NotificationConfiguration.js
31 1 5
metricsHelper.prototype.sendAnonymousMetric = function()
in cloudformationTemplates/urlPreviewForAsyncChat/js/metricsHelper.js
31 2 2
function sendResponse()
in cloudformationTemplates/urlPreviewForAsyncChat/js/websiteCreator.js
31 1 5
function sendResponse()
in cloudformationTemplates/asyncCustomerChatUX/js/S3NotificationConfiguration.js
31 1 5
metricsHelper.prototype.sendAnonymousMetric = function()
in cloudformationTemplates/asyncCustomerChatUX/js/metricsHelper.js
31 2 2
function sendResponse()
in cloudformationTemplates/asyncCustomerChatUX/js/websiteCreator.js
31 1 5
metricsHelper.prototype.sendAnonymousMetric = function()
in cloudformationTemplates/startChatContactAPI/js/metricsHelper.js
31 2 2
function updatePreviousConnectionData()
in cloudformationTemplates/urlPreviewForAsyncChat/js/startChatContact.js
29 3 2
function updatePreviousConnectionData()
in cloudformationTemplates/asyncCustomerChatUX/js/startChatContact.js
29 3 2
websiteHelper.prototype.copyWebSiteAssets = function()
in cloudformationTemplates/urlPreviewForAsyncChat/js/websiteHelper.js
28 3 2