amazon-connect / amazon-connect-voice-id-sample-application
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 13 units with 247 lines of code in units (36.2% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 7 medium size units (199 lines of code)
    • 1 small units (12 lines of code)
    • 5 very small units (36 lines of code)
0% | 0% | 80% | 4% | 14%
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% | 80% | 4% | 14%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
website-creator0% | 0% | 74% | 8% | 16%
website-creator/js0% | 0% | 87% | 0% | 12%
Alternative Visuals
Longest Units
Top 13 longest units
Unit# linesMcCabe index# params
function uploadToS3()
in website-creator/website-helper.js
46 13 7
let sendResponse = function()
in website-creator/index.js
34 1 5
function updateGUI()
in website-creator/js/voiceid.js
26 10 1
function optOut()
in website-creator/js/voiceid.js
24 3 0
websiteHelper.prototype.copyWebSiteAssets = function()
in website-creator/website-helper.js
24 3 2
function enrollVoice()
in website-creator/js/voiceid.js
23 3 0
function authenticateVoice()
in website-creator/js/voiceid.js
22 3 1
function()
in website-creator/index.js
12 2 2
let validateJSON = function()
in website-creator/website-helper.js
10 2 1
function clearGUI()
in website-creator/js/voiceid.js
8 1 0
function()
in website-creator/website-helper.js
7 2 2
uploadToS3()
in website-creator/website-helper.js
6 2 8
function subscribeToContactEvents()
in website-creator/js/voiceid.js
5 1 1