aws-samples / amazon-workmail-lambda-templates
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 79 units with 1,163 lines of code in units (47.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 6 medium complex units (210 lines of code)
    • 12 simple units (337 lines of code)
    • 61 very simple units (616 lines of code)
0% | 0% | 18% | 28% | 52%
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% | 19% | 31% | 49%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
workmail-salesforce-python0% | 0% | 25% | 27% | 46%
workmail-save-and-update-email0% | 0% | 33% | 17% | 48%
workmail-hello-world-python0% | 0% | 100% | 0% | 0%
workmail-translate-email0% | 0% | 22% | 30% | 46%
workmail-update-email0% | 0% | 25% | 22% | 51%
workmail-restricted-mailboxes-python0% | 0% | 0% | 64% | 35%
workmail-chat-bot-python0% | 0% | 0% | 65% | 34%
workmail-upstream-gateway-filter0% | 0% | 0% | 100% | 0%
workmail-wordpress-python0% | 0% | 0% | 22% | 77%
workmail-ws1-integration0% | 0% | 0% | 0% | 100%
workmail-stop-mail-storm0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def update_handler()
in workmail-save-and-update-email/src/app.py
49 14 2
def salesforce_handler()
in workmail-salesforce-python/src/app.py
36 13 2
def lambda_handler()
in workmail-hello-world-python/src/app.py
43 13 2
def update_handler()
in workmail-update-email/src/app.py
28 12 2
def translate_handler()
in workmail-translate-email/src/app.py
30 12 2
def process_contact_and_account_id()
in workmail-salesforce-python/src/sf_utils.py
24 11 4
def update_email_body()
in workmail-save-and-update-email/src/utils.py
26 9 2
def upstream_gateway_handler()
in workmail-upstream-gateway-filter/src/app.py
48 9 2
def restricted_mailboxes_handler()
in workmail-restricted-mailboxes-python/src/app.py
63 9 2
def update_email_body()
in workmail-update-email/src/utils.py
24 8 1
def chat_handler()
in workmail-chat-bot-python/src/app.py
37 8 2
def extract_email_body()
in workmail-chat-bot-python/src/utils.py
17 8 1
def extract_email_body()
in workmail-wordpress-python/src/utils.py
17 8 1
def update_email_body()
in workmail-translate-email/src/utils.py
24 8 2
def process_email()
in workmail-salesforce-python/src/sf_utils.py
28 7 3
def extract_text_body()
in workmail-salesforce-python/src/email_utils.py
17 7 1
def extract_text_body()
in workmail-translate-email/src/utils.py
17 7 1
def get_meeeting_body()
in workmail-salesforce-python/src/sf_utils.py
19 6 2
def lambda_handler()
in workmail-ws1-integration/src/app.py
20 5 2
def search_active_words()
in workmail-chat-bot-python/src/utils.py
10 5 2