cdklabs / construct-hub-webapp
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 65 units with 490 lines of code in units (4.8% 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)
    • 1 simple units (55 lines of code)
    • 64 very simple units (435 lines of code)
0% | 0% | 0% | 11% | 88%
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% | 15% | 84%
tsx0% | 0% | 0% | 0% | 100%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/api0% | 0% | 0% | 27% | 72%
src/views0% | 0% | 0% | 0% | 100%
src/components0% | 0% | 0% | 0% | 100%
src/theme0% | 0% | 0% | 0% | 100%
src/lib0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
constructor()
in src/api/catalog-search/catalog-search.ts
55 6 2
private filter()
in src/api/catalog-search/catalog-search.ts
26 5 2
public search()
in src/api/catalog-search/catalog-search.ts
12 4 1
private query()
in src/api/catalog-search/catalog-search.ts
23 4 1
private dedup()
in src/api/catalog-search/catalog-search.ts
13 4 1
private detectConstructFrameworks()
in src/api/catalog-search/catalog-search.ts
35 4 0
name: eventName()
in src/views/Search/CheckboxFilter.tsx
28 3 4
CDK for CloudFormation()
in src/views/FAQ/FAQ.tsx
6 3 1
CDK for Kubernetes()
in src/views/FAQ/FAQ.tsx
6 3 2
AWS Partner Network()
in src/views/Contribute/Contribute.tsx
9 3 1
public findByName()
in src/api/catalog-search/catalog-search.ts
10 3 1
dataEvent ? eventName()
in src/components/PackageCard/Heading.tsx
23 3 3
query: getParamFromUrl()
in src/views/Search/util.ts
7 2 1
keywords: parseQueryArray()
in src/views/Search/util.ts
6 2 1
sort: newSort ?()
in src/views/Search/SortFilter.tsx
11 2 1
chosen by its publisher()
in src/views/FAQ/FAQ.tsx
15 2 5
__storeWriter: getLocalStoreWriter()
in src/lib/shortbread/shortbread.ts
9 2 0
private sort()
in src/api/catalog-search/catalog-search.ts
14 2 2
private detectKeywords()
in src/api/catalog-search/catalog-search.ts
13 2 0
isNavLink ?()
in src/components/NavPopover/NavPopoverContent.tsx
3 2 0