aws-samples / duomfa-with-amazon-cognito
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 256 units with 4,407 lines of code in units (73.3% of code).
    • 3 very long units (1,384 lines of code)
    • 4 long units (261 lines of code)
    • 37 medium size units (1,162 lines of code)
    • 46 small units (680 lines of code)
    • 166 very small units (920 lines of code)
31% | 5% | 26% | 15% | 20%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js31% | 5% | 26% | 15% | 20%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
public31% | 5% | 26% | 15% | 20%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
var CognitoUser = function()
in public/amazon-cognito-identity.js
1063 152 0
(function(module, exports, __webpack_require__)()
in public/amazon-cognito-identity.js
198 6 3
var AuthenticationHelper = function()
in public/amazon-cognito-identity.js
123 16 0
function bnModPow()
in public/amazon-cognito-identity.js
71 19 3
function utf8Slice()
in public/amazon-cognito-identity.js
66 24 3
function bnpDivRemTo()
in public/amazon-cognito-identity.js
64 19 3
function utf8ToBytes()
in public/amazon-cognito-identity.js
60 22 2
function slowToString()
in public/amazon-cognito-identity.js
49 22 3
_doProcessBlock: function()
in public/amazon-cognito-identity.js
48 3 2
var CognitoUserPool = function()
in public/amazon-cognito-identity.js
48 2 0
fetch()
in public/amazon-cognito-identity.js
47 13 2
exports.write = function()
in public/amazon-cognito-identity.js
45 17 6
function bidirectionalIndexOf()
in public/amazon-cognito-identity.js
44 19 5
function arrayIndexOf()
in public/amazon-cognito-identity.js
44 20 5
function ready()
in public/Duo-Web-v2.js
43 14 2
function byteLength()
in public/amazon-cognito-identity.js
41 23 2
function toByteArray()
in public/amazon-cognito-identity.js
37 5 1
function set()
in public/amazon-cognito-identity.js
37 10 3
(function (root, factory)()
in public/Duo-Web-v2.js
36 5 2
function bnToString()
in public/amazon-cognito-identity.js
32 15 1