aws-amplify / aws-amplify.github.io
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 27 units with 303 lines of code in units (3.9% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (79 lines of code)
    • 1 medium size units (32 lines of code)
    • 6 small units (83 lines of code)
    • 19 very small units (109 lines of code)
0% | 26% | 10% | 27% | 35%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 26% | 10% | 27% | 35%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
amplify-theme/assets/js0% | 26% | 10% | 27% | 35%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
( function( $ )()
in amplify-theme/assets/js/scripts.js
79 19 1
var generateList = function()
in amplify-theme/assets/js/scripts.js
32 9 2
scrollIfAnchor: function()
in amplify-theme/assets/js/scripts.js
16 5 2
var majik = function()
in amplify-theme/assets/js/scripts.js
15 5 2
$.fn.reduce = function()
in amplify-theme/assets/js/scripts.js
14 1 2
var addLineNumbers = function()
in amplify-theme/assets/js/scripts.js
14 4 0
var showNotificationBar = function()
in amplify-theme/assets/js/scripts.js
13 3 1
var reduceLevels = function()
in amplify-theme/assets/js/scripts.js
11 4 1
var getHeadingLevel = function()
in amplify-theme/assets/js/scripts.js
10 3 1
$()
in amplify-theme/assets/js/scripts.js
10 2 1
var collapseSearchBar = function()
in amplify-theme/assets/js/scripts.js
10 1 0
delegateAnchors: function()
in amplify-theme/assets/js/scripts.js
9 3 1
var expandSearchBar = function()
in amplify-theme/assets/js/scripts.js
9 1 0
var trackOutboundLink = function()
in amplify-theme/assets/js/scripts.js
9 1 1
$.urlParam = function()
in amplify-theme/assets/js/scripts.js
7 3 1
$()
in amplify-theme/assets/js/scripts.js
6 1 1
init: function()
in amplify-theme/assets/js/scripts.js
5 1 0
scrollTop: $()
in amplify-theme/assets/js/scripts.js
5 1 1
top: function()
in amplify-theme/assets/js/scripts.js
5 1 0
bottom: function()
in amplify-theme/assets/js/scripts.js
5 1 0