aws-samples / aws-service-control-policies-deployment
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 16 units with 368 lines of code in units (86.4% 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)
    • 2 simple units (72 lines of code)
    • 14 very simple units (296 lines of code)
0% | 0% | 0% | 19% | 80%
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% | 49% | 50%
ts0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/custom_resources0% | 0% | 0% | 49% | 50%
lib0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 16 most complex units
Unit# linesMcCabe index# params
def create_or_attach_scps()
in lib/custom_resources/create_and_attach_scp.py
51 9 3
def get_current_policies()
in lib/custom_resources/create_and_attach_scp.py
21 7 1
def handler()
in lib/custom_resources/create_and_attach_scp.py
31 4 2
def create_policies()
in lib/custom_resources/create_and_attach_scp.py
7 2 1
def attach_policies()
in lib/custom_resources/create_and_attach_scp.py
7 2 1
constructor()
in lib/setup-member-account-stack.ts
65 1 3
constructor()
in lib/setup-org-management-stack.ts
29 1 3
constructor()
in lib/setup-builder-account-stack.ts
129 1 3
def get_org_role()
in lib/custom_resources/create_and_attach_scp.py
4 1 0
def get_policy()
in lib/custom_resources/create_and_attach_scp.py
3 1 2
def assume_role()
in lib/custom_resources/create_and_attach_scp.py
6 1 2
def get_dict_from_key()
in lib/custom_resources/create_and_attach_scp.py
4 1 2
def get_job_id()
in lib/custom_resources/create_and_attach_scp.py
2 1 1
def get_user_params()
in lib/custom_resources/create_and_attach_scp.py
3 1 1
def get_s3_bucket_name()
in lib/custom_resources/create_and_attach_scp.py
3 1 1
def get_action_name()
in lib/custom_resources/create_and_attach_scp.py
3 1 1