aws-samples / amazon-connect-ivr-searchandplay
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 18 units with 594 lines of code in units (39.4% of code).
    • 3 very long units (355 lines of code)
    • 1 long units (62 lines of code)
    • 2 medium size units (63 lines of code)
    • 5 small units (74 lines of code)
    • 7 very small units (40 lines of code)
59% | 10% | 10% | 12% | 6%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js59% | 10% | 10% | 12% | 6%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/components73% | 0% | 6% | 15% | 5%
src0% | 63% | 35% | 0% | 1%
amplify/backend/function/connectgetreclambda/src0% | 0% | 0% | 0% | 100%
amplify/backend/function/connectgeturl/src0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 18 longest units
Unit# linesMcCabe index# params
function SearchForm()
in src/components/SearchForm.js
140 9 1
function RecordDetails()
in src/components/RecordDetails.js
113 5 1
function SearchTable()
in src/components/SearchTable.js
102 9 1
function App()
in src/App.js
62 10 1
34 9 0
componentDidMount()
in src/components/Player.js
29 3 0
render()
in src/components/Player.js
18 1 0
render()
in src/components/TopMenu.js
18 1 0
componentDidUpdate()
in src/components/Player.js
14 5 0
constructor()
in src/components/Player.js
13 1 1
updateCounters()
in src/components/Player.js
11 3 0
function calcDuration()
in src/components/RecordDetails.js
10 3 2
function isEmpty()
in amplify/backend/function/connectgetreclambda/src/app.js
7 3 1
function isEmpty()
in amplify/backend/function/connectgeturl/src/app.js
7 3 1
function dateTimeFormat()
in src/components/RecordDetails.js
6 3 1
handleDownload()
in src/components/Player.js
6 1 1
handleMe()
in src/components/Player.js
3 1 0
function()
in src/App.js
1 1 1