awslabs / aws-multi-account-viewer
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 86 units with 1,670 lines of code in units (42.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (74 lines of code)
    • 4 simple units (163 lines of code)
    • 81 very simple units (1,433 lines of code)
0% | 0% | 4% | 9% | 85%
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
py0% | 0% | 8% | 18% | 72%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Back-End/lambdas0% | 0% | 8% | 18% | 72%
Front-End/src/pages0% | 0% | 0% | 0% | 100%
Front-End/src0% | 0% | 0% | 0% | 100%
Front-End/src/components0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def compare_and_update_function()
in Back-End/lambdas/receive_sqs_message.py
74 23 4
def get_current_table()
in Back-End/lambdas/receive_sqs_message.py
23 9 3
def lambda_handler()
in Back-End/lambdas/send_sqs_message.py
95 8 2
def compare_lists_and_update()
in Back-End/lambdas/receive_sqs_message.py
9 8 2
def get_all_ec2()
in Back-End/lambdas/receive_sqs_message.py
36 7 3
def get_all_iam_roles()
in Back-End/lambdas/receive_sqs_message.py
25 5 2
def get_all_iam_users()
in Back-End/lambdas/receive_sqs_message.py
26 5 2
def get_organizations()
in Back-End/lambdas/receive_sqs_message.py
26 5 3
def get_all_s3_buckets()
in Back-End/lambdas/receive_sqs_message.py
31 5 2
export default function register()
in Front-End/src/registerServiceWorker.js
22 5 0
def scan_table()
in Back-End/lambdas/list_table.py
13 4 0
def query_table()
in Back-End/lambdas/list_table.py
16 4 1
def assume_sts_role()
in Back-End/lambdas/receive_sqs_message.py
19 4 2
def get_all_lambda()
in Back-End/lambdas/receive_sqs_message.py
33 4 3
def get_all_rds()
in Back-End/lambdas/receive_sqs_message.py
32 4 3
def get_all_odcr()
in Back-End/lambdas/receive_sqs_message.py
30 4 3
def get_all_ris()
in Back-End/lambdas/receive_sqs_message.py
22 4 3
def lambda_handler()
in Back-End/lambdas/list_table.py
14 3 2
def get_all_eks()
in Back-End/lambdas/receive_sqs_message.py
26 3 3
def get_all_iam_attached_policys()
in Back-End/lambdas/receive_sqs_message.py
17 3 2