awslabs / fhir-works-on-aws-ui
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 42 units with 1,068 lines of code in units (44.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 (49 lines of code)
    • 41 very simple units (1,019 lines of code)
0% | 0% | 0% | 4% | 95%
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
tsx0% | 0% | 0% | 5% | 94%
ts0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/components/search0% | 0% | 0% | 9% | 90%
src/common/backend0% | 0% | 0% | 0% | 100%
src/components/create0% | 0% | 0% | 0% | 100%
src/components/delete0% | 0% | 0% | 0% | 100%
src/components/read0% | 0% | 0% | 0% | 100%
src/components/update0% | 0% | 0% | 0% | 100%
amplify-infra/lib0% | 0% | 0% | 0% | 100%
src/common/utils0% | 0% | 0% | 0% | 100%
src/components0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function populateVisibleContentPreferenceOptions()
in src/components/search/SearchResults.tsx
49 7 0
function populateColumnDefinitions()
in src/components/search/SearchResults.tsx
38 4 0
function searchResults()
in src/components/search/SearchResults.tsx
163 4 0
function getMatchesCountText()
in src/components/search/SearchResults.tsx
7 3 1
function previewPane()
in src/components/search/SearchResults.tsx
45 3 0
async read()
in src/common/backend/FWoABackend.ts
12 2 2
async create()
in src/common/backend/FWoABackend.ts
13 2 1
async delete()
in src/common/backend/FWoABackend.ts
12 2 2
async update()
in src/common/backend/FWoABackend.ts
14 2 1
function createForm()
in src/components/create/Create.tsx
85 2 0
function deleteForm()
in src/components/delete/Delete.tsx
63 2 0
function getSearchParamKeys()
in src/components/search/Search.tsx
11 2 0
function convertValueToString()
in src/components/search/SearchResults.tsx
7 2 1
function results()
in src/components/search/SearchResults.tsx
12 2 0
async function readProvidedResource()
in src/components/update/Update.tsx
10 2 0
function updateForm()
in src/components/update/Update.tsx
51 2 0
function readForm()
in src/components/read/Read.tsx
59 2 0
function onFollowHandler()
in src/components/Navigation.tsx
6 2 1
export function storeAccessTokenState()
in src/common/utils/AccessTokenUtil.ts
3 1 1
export function isAccessTokenValid()
in src/common/utils/AccessTokenUtil.ts
3 1 1