aws-samples / aws-saas-factory-ref-solution-serverless-saas
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 256 units with 2,830 lines of code in units (24.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (165 lines of code)
    • 5 simple units (193 lines of code)
    • 247 very simple units (2,472 lines of code)
0% | 0% | 5% | 6% | 87%
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% | 9% | 82%
ts0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
server/Resources0% | 0% | 35% | 33% | 30%
server/TenantManagementService0% | 0% | 4% | 4% | 90%
server/TenantPipeline0% | 0% | 0% | 13% | 86%
clients/Application0% | 0% | 0% | 0% | 100%
server/layers0% | 0% | 0% | 0% | 100%
clients/Admin0% | 0% | 0% | 0% | 100%
server/ProductService0% | 0% | 0% | 0% | 100%
server/OrderService0% | 0% | 0% | 0% | 100%
server/custom_resources0% | 0% | 0% | 0% | 100%
clients/Landing0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def lambda_handler()
in server/Resources/shared_service_authorizer.py
74 14 2
def validateJWT()
in server/Resources/tenant_authorizer.py
27 11 3
def validateJWT()
in server/Resources/shared_service_authorizer.py
27 11 3
def get_users()
in server/TenantManagementService/user-management.py
37 11 2
def lambda_handler()
in server/Resources/tenant_authorizer.py
72 9 2
def lambda_handler()
in server/TenantPipeline/resources/lambda-deploy-tenant-stack.py
33 9 2
def _addMethod()
in server/Resources/tenant_authorizer.py
25 7 5
def _addMethod()
in server/Resources/shared_service_authorizer.py
25 7 5
def register_tenant()
in server/TenantManagementService/tenant-registration.py
38 7 2
def _getStatementForEffect()
in server/Resources/tenant_authorizer.py
14 5 3
def build()
in server/Resources/tenant_authorizer.py
14 5 1
def _getStatementForEffect()
in server/Resources/shared_service_authorizer.py
14 5 3
def build()
in server/Resources/shared_service_authorizer.py
14 5 1
def update_tenant()
in server/TenantManagementService/tenant-management.py
39 5 2
def deactivate_tenant()
in server/TenantManagementService/tenant-management.py
41 5 2
def __getApiKey()
in server/TenantManagementService/tenant-management.py
9 5 1
def get_user()
in server/TenantManagementService/user-management.py
28 5 2
def update_user()
in server/TenantManagementService/user-management.py
45 5 2
def disable_user()
in server/TenantManagementService/user-management.py
33 5 2
def disable_users_by_tenant()
in server/TenantManagementService/user-management.py
23 5 2