aws-samples / aws-bootstrap-kit-examples
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 68 units with 1,671 lines of code in units (34.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (283 lines of code)
    • 1 simple units (19 lines of code)
    • 64 very simple units (1,369 lines of code)
0% | 0% | 16% | 1% | 81%
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% | 20% | 0% | 79%
java0% | 0% | 0% | 23% | 76%
tsx0% | 0% | 0% | 0% | 100%
js0% | 0% | 0% | 0% | 100%
php0% | 0% | 0% | 0% | 100%
m0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
4-landing-page-with-feedback-api/infrastructure0% | 0% | 52% | 0% | 47%
per-stage-dns/lib0% | 0% | 76% | 0% | 23%
3-landing-page-cicd/cdk0% | 0% | 43% | 0% | 56%
5-unicornPics/mobileapp0% | 0% | 0% | 11% | 88%
5-unicornPics/backend0% | 0% | 0% | 0% | 100%
4-containerized-service/cdk0% | 0% | 0% | 0% | 100%
2-landing-page/cdk0% | 0% | 0% | 0% | 100%
5-unicornPics/loadtesting0% | 0% | 0% | 0% | 100%
5-unicornPics/webapp0% | 0% | 0% | 0% | 100%
4-landing-page-with-feedback-api/ui0% | 0% | 0% | 0% | 100%
1-SDLC-organization/lib0% | 0% | 0% | 0% | 100%
4-containerized-service/php-fpm0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
constructor()
in source/4-landing-page-with-feedback-api/infrastructure/lib/cicd-pipeline-stack.ts
97 13 3
constructor()
in source/per-stage-dns/lib/cicd-pipeline-stack.ts
97 13 3
constructor()
in source/3-landing-page-cicd/cdk/lib/cicd-stack.ts
89 12 3
private static void initializeFlipper()
in source/5-unicornPics/mobileapp/android/app/src/main/java/com/activateacademymobileapp/MainApplication.java
19 6 2
constructor()
in source/4-containerized-service/cdk/lib/pipeline-stack.ts
74 5 3
constructor()
in source/2-landing-page/cdk/lib/landing-page-stack.ts
103 4 3
export default function Input()
in source/4-landing-page-with-feedback-api/ui/src/Components/Input.tsx
14 4 1
constructor()
in source/3-landing-page-cicd/cdk/lib/landing-page-stack.ts
103 4 3
async function fetchConfig()
in source/4-landing-page-with-feedback-api/ui/src/services.ts
14 3 1
static async fetchConfig()
in source/5-unicornPics/webapp/src/Api.tsx
15 3 1
public static void initializeFlipper()
in source/5-unicornPics/mobileapp/android/app/src/debug/java/com/activateacademymobileapp/ReactNativeFlipper.java
39 3 2
function App()
in source/4-landing-page-with-feedback-api/ui/src/Components/App.tsx
13 2 0
function onClickButton()
in source/4-landing-page-with-feedback-api/ui/src/Components/App.tsx
15 2 0
public visit()
in source/4-landing-page-with-feedback-api/infrastructure/lib/permission-boundary.ts
6 2 1
public visit()
in source/per-stage-dns/lib/permission-boundary.ts
6 2 1
constructor()
in source/per-stage-dns/lib/dns-infrastructure-stack.ts
17 2 3
public visit()
in source/3-landing-page-cicd/cdk/lib/permission-boundary.ts
6 2 1
export async function submitForm()
in source/4-landing-page-with-feedback-api/ui/src/services.ts
7 1 1
function Alert()
in source/4-landing-page-with-feedback-api/ui/src/Components/SubmissionResult.tsx
3 1 1
function onFail()
in source/4-landing-page-with-feedback-api/ui/src/Components/App.tsx
4 1 0