aws-samples / amplify-video-community
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 188 units with 2,067 lines of code in units (18.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (57 lines of code)
    • 3 simple units (79 lines of code)
    • 184 very simple units (1,931 lines of code)
0% | 0% | 2% | 3% | 93%
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
js0% | 0% | 11% | 16% | 71%
ts0% | 0% | 0% | 0% | 100%
tsx0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
apps/community-website/amplify/backend/function0% | 0% | 11% | 16% | 71%
apps/community-website/src/graphql0% | 0% | 0% | 0% | 100%
apps/community-website/src/shared/api0% | 0% | 0% | 0% | 100%
apps/community-website/src/shared/components0% | 0% | 0% | 0% | 100%
apps/community-website/src/shared/hooks0% | 0% | 0% | 0% | 100%
apps/community-website/src/shared/admin0% | 0% | 0% | 0% | 100%
apps/community-website/src/shared/home0% | 0% | 0% | 0% | 100%
apps/community-website/src/pages0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
listSectionsAndMedias: async()
in apps/community-website/amplify/backend/function/resourcesManager/src/SectionManager.js
57 13 0
updateMedia: async()
in apps/community-website/amplify/backend/function/resourcesManager/src/MediaManager.js
30 9 1
getMedia: async()
in apps/community-website/amplify/backend/function/resourcesManager/src/MediaManager.js
28 8 1
deleteMedia: async()
in apps/community-website/amplify/backend/function/resourcesManager/src/MediaManager.js
21 7 1
async function acceptContentSubmission()
in apps/community-website/src/shared/api/content-submission-mutate.ts
21 4 4
function removeMedia()
in apps/community-website/src/shared/api/mutate.ts
9 4 2
function getWindowDimensions()
in apps/community-website/src/shared/hooks/index.tsx
10 4 0
deleteSection: async()
in apps/community-website/amplify/backend/function/resourcesManager/src/SectionManager.js
16 3 1
createMedia: async()
in apps/community-website/amplify/backend/function/resourcesManager/src/MediaManager.js
13 3 1
async function fetchVodFiles()
in apps/community-website/src/shared/api/vod-fetch.ts
11 3 1
displayList ? setDisplayList()
in apps/community-website/src/shared/components/Dropdown/index.tsx
6 3 1
await putThumbnailFile()
in apps/community-website/src/shared/api/live-mutate.ts
2 2 2
await setThumbnail()
in apps/community-website/src/shared/api/live-mutate.ts
2 2 1
async function getAuthMode()
in apps/community-website/src/shared/api/helper.ts
6 2 0
await refreshUserCredentials()
in apps/community-website/src/shared/api/helper.ts
6 2 0
await uploadSourceYoutube()
in apps/community-website/src/shared/api/content-submission-mutate.ts
9 2 5
async function fetchMedia()
in apps/community-website/src/shared/api/fetch.ts
15 2 1
await removeThumbnailFile()
in apps/community-website/src/shared/api/vod-mutate.ts
2 2 1
await putThumbnailFile()
in apps/community-website/src/shared/api/vod-mutate.ts
2 2 2
await putVodFile()
in apps/community-website/src/shared/api/vod-mutate.ts
9 2 4