aws-solutions / serverless-bot-framework
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 108 units with 1,906 lines of code in units (63.9% 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 (27 lines of code)
    • 107 very simple units (1,879 lines of code)
0% | 0% | 0% | 1% | 98%
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% | 0% | 2% | 97%
ts0% | 0% | 0% | 0% | 100%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source/services/solution-helper0% | 0% | 0% | 77% | 22%
source/infrastructure/lib0% | 0% | 0% | 0% | 100%
source/services/lex-bot/order_pizza0% | 0% | 0% | 0% | 100%
source/services/lex-bot/book_appointment0% | 0% | 0% | 0% | 100%
source/services/lex-bot/leave_feedback0% | 0% | 0% | 0% | 100%
source/services/lex-bot0% | 0% | 0% | 0% | 100%
source/services/lex-bot/other_intents0% | 0% | 0% | 0% | 100%
source/services/lex-bot/weather_forecast0% | 0% | 0% | 0% | 100%
source/services/core0% | 0% | 0% | 0% | 100%
source/services/webclient-setup0% | 0% | 0% | 0% | 100%
source/services/lex-bot/shared0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def custom_resource()
in source/services/solution-helper/lambda_function.py
27 6 2
def delete_resource()
in source/services/webclient-setup/lambda_function.py
9 5 2
def wait_for_bot_delete()
in source/services/lex-bot/lambda_function.py
17 5 1
def replace_config_anchors()
in source/services/webclient-setup/lambda_function.py
21 4 2
def create_resource()
in source/services/webclient-setup/lambda_function.py
20 4 2
def get_logger()
in source/services/lex-bot/shared/logger.py
12 4 1
lang: verifyLocale()
in source/services/core/index.js
6 4 1
public static addSuppressions()
in source/infrastructure/lib/cfn-nag-helper.ts
16 4 2
def create_order_pizza_intent()
in source/services/lex-bot/order_pizza/intent.py
33 3 2
def create_appointment_intent()
in source/services/lex-bot/book_appointment/intent.py
36 3 2
def get_level()
in source/services/lex-bot/shared/logger.py
6 3 0
def wait_for_bot()
in source/services/lex-bot/lambda_function.py
10 3 1
def wait_for_locale()
in source/services/lex-bot/lambda_function.py
14 3 2
def wait_for_build()
in source/services/lex-bot/lambda_function.py
14 3 2
email: verifyEmail()
in source/services/core/index.js
16 3 1
def _sanitize_data()
in source/services/solution-helper/lambda_function.py
6 2 1
def create_feedback_intent()
in source/services/lex-bot/leave_feedback/intent.py
20 2 3
def get_client()
in source/services/lex-bot/shared/client.py
6 2 2
def create_weather_intent()
in source/services/lex-bot/weather_forecast/intent.py
5 2 2
def configure_lex_bot()
in source/services/lex-bot/lambda_function.py
11 2 4