aws-samples / secure-pipelines-in-aws-workshop
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 67 units with 1,012 lines of code in units (64.2% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (57 lines of code)
    • 19 medium size units (582 lines of code)
    • 11 small units (160 lines of code)
    • 36 very small units (213 lines of code)
0% | 5% | 57% | 15% | 21%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 5% | 57% | 15% | 21%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
code/SecGuardRails0% | 14% | 58% | 11% | 16%
code0% | 0% | 57% | 18% | 24%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def add_rules()
in code/SecGuardRails/cfn_validate_lambda.py
57 1 1
def evaluate_template()
in code/SecGuardRails/cfn_validate_lambda.py
48 18 2
def control_4_2_no_global_s3()
in code/SecGuardRails/stack_validate_lambda.py
39 17 1
def get_rules()
in code/SecGuardRails/cfn_validate_lambda.py
39 11 0
def evaluate_template()
in code/cfn_s3_versioning.py
34 10 2
def s3_next_step()
in code/cfn_encrypted_ebs.py
32 5 6
def s3_next_step()
in code/cfn_ftp_port.py
32 5 6
def s3_next_step()
in code/SecGuardRails/cfn_validate_lambda.py
32 5 6
def s3_next_step()
in code/cfn_secrets.py
32 5 6
def s3_next_step()
in code/cfn_s3_versioning.py
32 5 6
def evaluate_template()
in code/cfn_secrets.py
31 6 2
def evaluate_template()
in code/cfn_encrypted_ebs.py
30 9 2
def lambda_handler()
in code/SecGuardRails/stack_validate_lambda.py
27 13 2
def control_4_1_ensure_ssh_not_open_to_world()
in code/SecGuardRails/stack_validate_lambda.py
26 7 2
def lambda_handler()
in code/cfn_encrypted_ebs.py
25 5 2
def lambda_handler()
in code/cfn_ftp_port.py
25 5 2
def lambda_handler()
in code/cfn_secrets.py
25 5 2
def lambda_handler()
in code/cfn_s3_versioning.py
25 5 2
def evaluate_template()
in code/cfn_ftp_port.py
24 10 2
def lambda_handler()
in code/SecGuardRails/cfn_validate_lambda.py
24 5 2