angular / material.angular.io
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 115 units with 896 lines of code in units (11.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 10 simple units (193 lines of code)
    • 105 very simple units (703 lines of code)
0% | 0% | 0% | 21% | 78%
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% | 0% | 17% | 82%
js0% | 0% | 0% | 44% | 55%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/app0% | 0% | 0% | 19% | 80%
tools0% | 0% | 0% | 44% | 55%
scenes/src0% | 0% | 0% | 0% | 100%
src0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
onKeydown()
in src/app/shared/carousel/carousel.ts
18 8 1
private _replaceExamplePlaceholders()
in src/app/shared/stack-blitz/stack-blitz-writer.ts
30 8 4
function parseInput()
in tools/lighthouse-audit.js
22 7 1
selectCorrectTab()
in src/app/shared/example-viewer/example-viewer.ts
15 7 0
async function _main()
in tools/lighthouse-audit.js
35 6 1
private _generateExampleTabs()
in src/app/shared/example-viewer/example-viewer.ts
20 6 0
private _scrollToActiveItem()
in src/app/shared/carousel/carousel.ts
20 6 0
private _isOutOfView()
in src/app/shared/carousel/carousel.ts
8 6 2
private onScroll()
in src/app/shared/table-of-contents/table-of-contents.ts
17 6 0
isNavigationWithinComponentView()
in src/app/shared/navigation-focus/navigation-focus.service.ts
8 6 2
async function processResults()
in tools/lighthouse-audit.js
23 5 3
_getExampleTabNames()
in src/app/shared/example-viewer/example-viewer.ts
13 5 0
function parseMinScores()
in tools/lighthouse-audit.js
15 4 1
set example()
in src/app/shared/example-viewer/example-viewer.ts
11 4 1
private async _loadExampleComponent()
in src/app/shared/example-viewer/example-viewer.ts
12 4 0
_appendCopyright()
in src/app/shared/stack-blitz/stack-blitz-writer.ts
8 4 2
selectTheme()
in src/app/shared/theme-picker/theme-picker.ts
16 4 1
function resetScrollPosition()
in src/app/material-docs-app.ts
8 4 0
copySource()
in src/app/shared/example-viewer/example-viewer.ts
8 3 2
next()
in src/app/shared/carousel/carousel.ts
9 3 0