apple / password-manager-resources
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 25 units with 460 lines of code in units (81.7% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (94 lines of code)
    • 4 medium complex units (185 lines of code)
    • 2 simple units (51 lines of code)
    • 18 very simple units (130 lines of code)
0% | 20% | 40% | 11% | 28%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
js0% | 21% | 41% | 11% | 25%
rb0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tools0% | 20% | 40% | 11% | 28%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function _canonicalizedPropertyValues()
in tools/PasswordRulesParser.js
94 30 2
function parsePasswordRules()
in tools/PasswordRulesParser.js
50 17 2
function _parsePasswordRule()
in tools/PasswordRulesParser.js
52 14 2
function _parseCustomCharacterClass()
in tools/PasswordRulesParser.js
40 13 2
43 11 2
function _parsePasswordRulesInternal()
in tools/PasswordRulesParser.js
30 8 1
function _parseInteger()
in tools/PasswordRulesParser.js
21 7 2
function _isASCIIWhitespace()
in tools/PasswordRulesParser.js
5 5 1
function _markBitsForNamedCharacterClass()
in tools/PasswordRulesParser.js
24 5 2
function _isIdentifierCharacter()
in tools/PasswordRulesParser.js
5 4 1
function checkRange()
in tools/PasswordRulesParser.js
13 4 2
addEntriesToLegacyOutputArray
in tools/convert-shared-credential-to-legacy-format.rb
17 4 2
function _indexOfNonWhitespaceCharacter()
in tools/PasswordRulesParser.js
9 3 2
function _parseIdentifier()
in tools/PasswordRulesParser.js
17 3 2
function _isASCIIDigit()
in tools/PasswordRulesParser.js
5 2 1
function _isASCIIPrintableCharacter()
in tools/PasswordRulesParser.js
5 2 1
function _markBitsForCustomCharacterClass()
in tools/PasswordRulesParser.js
6 2 2
4 2 1
assert: function()
in tools/PasswordRulesParser.js
1 1 0
error: function()
in tools/PasswordRulesParser.js
1 1 0