microsoft / accessibility-insights-service
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 739 units with 7,591 lines of code in units (55.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (144 lines of code)
    • 21 simple units (602 lines of code)
    • 714 very simple units (6,845 lines of code)
0% | 0% | 1% | 7% | 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
ts0% | 0% | 1% | 7% | 90%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
packages/cli0% | 0% | 9% | 2% | 87%
packages/web-api-scan-runner0% | 0% | 5% | 0% | 94%
packages/web-api-scan-request-sender0% | 0% | 17% | 20% | 62%
packages/azure-services0% | 0% | 0% | 9% | 90%
packages/service-library0% | 0% | 0% | 8% | 91%
packages/web-api0% | 0% | 0% | 13% | 86%
packages/health-client0% | 0% | 0% | 55% | 44%
packages/axe-result-converter0% | 0% | 0% | 58% | 41%
packages/crawler0% | 0% | 0% | 7% | 92%
packages/web-api-send-notification-runner0% | 0% | 0% | 38% | 61%
packages/web-workers0% | 0% | 0% | 7% | 92%
packages/common0% | 0% | 0% | 4% | 95%
packages/logger0% | 0% | 0% | 0% | 100%
packages/privacy-scan-runner0% | 0% | 0% | 0% | 100%
packages/scanner-global-library0% | 0% | 0% | 0% | 100%
packages/privacy-scan-job-manager0% | 0% | 0% | 0% | 100%
packages/web-api-scan-job-manager0% | 0% | 0% | 0% | 100%
packages/web-api-client0% | 0% | 0% | 0% | 100%
packages/web-api-send-notification-job-manager0% | 0% | 0% | 0% | 100%
packages/parallel-workers0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
packages/e2e-web-apis0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public updateResultsInPlace()
in packages/cli/src/baseline/baseline-engine.ts
52 14 2
private async filterRequests()
in packages/web-api-scan-request-sender/src/sender/scan-request-selector.ts
34 13 2
private async canSendNotification()
in packages/web-api-scan-runner/src/sender/scan-notification-processor.ts
41 13 3
export function validateScanArguments()
in packages/cli/src/validate-scan-arguments.ts
17 12 1
private validateRunRequest()
in packages/web-api/src/controllers/scan-request-controller.ts
21 10 1
public async run()
in packages/health-client/src/deployment-health-checker.ts
41 9 4
private reduceResults()
in packages/axe-result-converter/src/axe-results-reducer.ts
33 8 3
public async readCombinedResults()
in packages/service-library/src/data-providers/combined-scan-results-provider.ts
38 8 1
private compareResultDetails()
in packages/cli/src/baseline/baseline-engine.ts
11 7 2
private validateScanStatusResponse()
in packages/health-client/src/scan-report-downloader.ts
17 7 2
public async run()
in packages/service-library/src/batch/batch-task-creator.ts
29 7 0
protected validateContentType()
in packages/service-library/src/web-api/api-controller.ts
20 7 0
private async trace()
in packages/web-api-scan-request-sender/src/sender/on-demand-dispatcher.ts
40 7 1
private async sendNotificationWithRetry()
in packages/web-api-send-notification-runner/src/sender/notification-sender.ts
48 7 1
public getScanResultResponse()
in packages/web-api/src/converters/scan-response-converter.ts
20 7 4
private reduceResultsWithoutNodes()
in packages/axe-result-converter/src/axe-results-reducer.ts
24 6 3
public async createJobIfNotExists()
in packages/azure-services/src/azure-batch/batch.ts
28 6 2
private async addTaskCollection()
in packages/azure-services/src/azure-batch/batch.ts
41 6 2
public async readItems()
in packages/azure-services/src/azure-cosmos/cosmos-client-wrapper.ts
43 6 5
private safelyCompareStrings()
in packages/cli/src/baseline/baseline-engine.ts
9 6 2