aws-samples / webauthn-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 233 units with 4,125 lines of code in units (71.7% of code).
    • 3 very long units (1,384 lines of code)
    • 4 long units (261 lines of code)
    • 33 medium size units (1,030 lines of code)
    • 42 small units (625 lines of code)
    • 151 very small units (825 lines of code)
33% | 6% | 24% | 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
js33% | 6% | 24% | 15% | 20%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
public33% | 6% | 25% | 14% | 20%
aws0% | 0% | 0% | 100% | 0%
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 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 bnToString()
in public/amazon-cognito-identity.js
32 15 1
function bnpSubTo()
in public/amazon-cognito-identity.js
31 7 2
function bnpAddTo()
in public/amazon-cognito-identity.js
31 8 2