apple / password-manager-resources
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 25 units with 460 lines of code in units (81.7% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (146 lines of code)
    • 6 medium size units (208 lines of code)
    • 3 small units (47 lines of code)
    • 14 very small units (59 lines of code)
0% | 31% | 45% | 10% | 12%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 32% | 46% | 6% | 13%
rb0% | 0% | 0% | 100% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
tools0% | 31% | 45% | 10% | 12%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function _canonicalizedPropertyValues()
in tools/PasswordRulesParser.js
94 30 2
function _parsePasswordRule()
in tools/PasswordRulesParser.js
52 14 2
function parsePasswordRules()
in tools/PasswordRulesParser.js
50 17 2
43 11 2
function _parseCustomCharacterClass()
in tools/PasswordRulesParser.js
40 13 2
function _parsePasswordRulesInternal()
in tools/PasswordRulesParser.js
30 8 1
function _markBitsForNamedCharacterClass()
in tools/PasswordRulesParser.js
24 5 2
function _parseInteger()
in tools/PasswordRulesParser.js
21 7 2
function _parseIdentifier()
in tools/PasswordRulesParser.js
17 3 2
addEntriesToLegacyOutputArray
in tools/convert-shared-credential-to-legacy-format.rb
17 4 2
function checkRange()
in tools/PasswordRulesParser.js
13 4 2
function _indexOfNonWhitespaceCharacter()
in tools/PasswordRulesParser.js
9 3 2
function _markBitsForCustomCharacterClass()
in tools/PasswordRulesParser.js
6 2 2
function _isIdentifierCharacter()
in tools/PasswordRulesParser.js
5 4 1
function _isASCIIDigit()
in tools/PasswordRulesParser.js
5 2 1
function _isASCIIPrintableCharacter()
in tools/PasswordRulesParser.js
5 2 1
function _isASCIIWhitespace()
in tools/PasswordRulesParser.js
5 5 1
function _bitSetIndexForCharacter()
in tools/PasswordRulesParser.js
5 1 1
function _characterAtBitSetIndex()
in tools/PasswordRulesParser.js
4 1 1
4 2 1