microsoft / accessibility-insights-web
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 1,604 units with 17,985 lines of code in units (28.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (943 lines of code)
    • 31 simple units (811 lines of code)
    • 1,569 very simple units (16,231 lines of code)
0% | 0% | 5% | 4% | 90%
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% | 0% | 72% | 7% | 20%
ts0% | 0% | <1% | 4% | 95%
tsx0% | 0% | 0% | 4% | 95%
nsh0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 0% | 94% | 0% | 5%
deploy0% | 0% | 100% | 0% | 0%
src/scanner0% | 0% | 7% | 13% | 79%
src/injected0% | 0% | 0% | 7% | 92%
src/common0% | 0% | 0% | 5% | 94%
tools/strict-null-checks0% | 0% | 0% | 29% | 70%
src/electron0% | 0% | 0% | 4% | 95%
src/DetailsView0% | 0% | 0% | 2% | 97%
src/background0% | 0% | 0% | 1% | 98%
src/reports0% | 0% | 0% | 1% | 98%
src/assessments0% | 0% | 0% | 1% | 98%
src/popup0% | 0% | 0% | 0% | 100%
src/views0% | 0% | 0% | 0% | 100%
src/issue-filing0% | 0% | 0% | 0% | 100%
src/debug-tools0% | 0% | 0% | 0% | 100%
src/content0% | 0% | 0% | 0% | 100%
src/Devtools0% | 0% | 0% | 0% | 100%
src/fast-pass0% | 0% | 0% | 0% | 100%
src/report-export0% | 0% | 0% | 0% | 100%
src/ad-hoc-visualizations0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
768 20 1
module.exports = function()
in deploy/Gruntfile.js
112 12 1
function getObservedRoleForElement()
in src/scanner/custom-rules/unique-landmark.ts
28 12 1
function evaluate()
in src/scanner/custom-rules/unique-landmark.ts
35 11 2
public getDrawerConfiguration()
in src/injected/visualization/heading-formatter.ts
36 10 2
async function main()
in tools/strict-null-checks/find.js
30 10 0
public generateInitialState()
in src/background/initial-assessment-store-data-generator.ts
23 9 1
private getCenterPositionRelativeToAreaShape()
in src/injected/visualization/center-position-calculator.ts
69 9 6
protected isCompositeCustomWidget()
in src/injected/visualization/custom-widgets-formatter.ts
14 9 1
private createLinesInTabOrderVisualization()
in src/injected/visualization/svg-drawer.ts
32 9 5
private darkenLighten()
in src/common/components/recommend-color.tsx
18 8 2
private recommend()
in src/common/components/recommend-color.tsx
94 8 3
export function getImageCodedAs()
in src/scanner/axe-utils.ts
14 8 1
export function getNativeWidgetElementType()
in src/scanner/custom-rules/native-widgets-default.ts
10 8 1
private static applyDefaultFunctions()
in src/assessments/assessment-builder.tsx
22 7 1
export function convertAtfaScanResultsToUnifiedResults()
in src/electron/platform/android/atfa-scan-results-to-unified-results.ts
32 7 3
private getFrameSelectorToResultMap()
in src/injected/frameCommunicators/html-element-axe-results-helper.ts
23 7 1
function reduceCompletedSet()
in tools/strict-null-checks/collapse-completed-directories.js
21 7 2
function getImportsForFile()
in tools/strict-null-checks/import-finder.js
36 7 2
private renderComponent()
in src/DetailsView/components/issues-table.tsx
28 6 0