aws-samples / ac-contactflowapi
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 42 units with 800 lines of code in units (40.7% of code).
    • 1 very long units (136 lines of code)
    • 1 long units (86 lines of code)
    • 11 medium size units (313 lines of code)
    • 11 small units (168 lines of code)
    • 18 very small units (97 lines of code)
17% | 10% | 39% | 21% | 12%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js17% | 10% | 39% | 21% | 12%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
website-creator/js20% | 12% | 32% | 23% | 11%
website-creator0% | 0% | 74% | 8% | 17%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function setupAll()
in website-creator/js/connectflows.js
136 8 0
async function handlePushFlowWindow()
in website-creator/js/connectflows.js
86 18 2
async function uploadToS3()
in website-creator/website-helper.js
44 13 5
let sendResponse = function()
in website-creator/index.js
34 1 5
async function createContactFlow()
in website-creator/js/connectflows.js
31 2 0
function fillContactFlowTables()
in website-creator/js/connectflows.js
30 4 1
function saveCookie()
in website-creator/js/connectflows.js
29 2 0
async function changeContactFlowName()
in website-creator/js/connectflows.js
28 4 0
async function describeInstance()
in website-creator/js/connectflows.js
27 3 5
function checkCookie()
in website-creator/js/connectflows.js
25 1 0
async function updateContactFlowDetails()
in website-creator/js/connectflows.js
22 3 0
websiteHelper.prototype.copyWebSiteAssets = function()
in website-creator/website-helper.js
22 3 2
async function getContactFlowDetails()
in website-creator/js/connectflows.js
21 2 5
function getNameFromFlow()
in website-creator/js/connectflows.js
20 6 2
function backupContactFlows()
in website-creator/js/connectflows.js
19 4 1
async function updateFlowDetails()
in website-creator/js/connectflows.js
19 4 0
async function getContactFlows()
in website-creator/js/connectflows.js
18 2 0
async function getContactFlows2()
in website-creator/js/connectflows.js
16 2 0
function checkAllMandatoryFields()
in website-creator/js/connectflows.js
16 21 0
function getCookie()
in website-creator/js/connectflows.js
14 3 1