aws-amplify / docs
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 51 units with 928 lines of code in units (11.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (166 lines of code)
    • 3 simple units (44 lines of code)
    • 46 very simple units (718 lines of code)
0% | 0% | 17% | 4% | 77%
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% | 54% | 12% | 32%
tsx0% | 0% | 0% | 1% | 98%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tasks0% | 0% | 77% | 0% | 22%
src/utils0% | 0% | 36% | 22% | 41%
src/components0% | 0% | 0% | 1% | 98%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export function traverseHeadings()
in src/utils/traverseHeadings.ts
61 24 2
const grab = function()
in tasks/migrate.ts
105 20 0
function gatherFilters()
in src/utils/gatherFilters.ts
25 10 1
const treeHasAgnosticContent = function()
in src/utils/gatherFilters.ts
12 7 1
function propsAreEmpty()
in src/components/UiComponentProps/index.tsx
7 6 2
export function transformData()
in src/utils/transform-search-data.ts
19 5 1
export function gatherAllFilters()
in src/utils/gatherFilters.ts
10 5 2
export default function FilterChildren()
in src/components/FilterChildren/index.tsx
15 5 1
export function isProductRoot()
in src/utils/getLocalDirectory.ts
13 4 1
function createEditLink()
in src/components/Menu/RepoActions/index.tsx
11 4 1
export default function UiComponentProps()
in src/components/UiComponentProps/index.tsx
22 4 4
function Content()
in src/components/UiComponentProps/index.tsx
32 4 2
export function propsAreEmptyByTag()
in src/components/UiComponentProps/index.tsx
9 4 2
export default function BlockSwitcher()
in src/components/BlockSwitcher/index.tsx
38 4 1
export function parseLocalStorage()
in src/utils/parseLocalStorage.ts
8 3 2
const addFilters = function()
in src/utils/gatherFilters.ts
5 3 2
render()
in src/components/CodeBlock/index.tsx
14 3 0
constructor()
in src/components/Menu/Directory/index.tsx
12 3 1
render()
in src/components/Menu/Directory/index.tsx
27 3 0
const getActiveIndex = function()
in src/components/BlockSwitcher/index.tsx
16 3 2