aws-samples / data-protection
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 30 units with 1,820 lines of code in units (25.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 5 medium complex units (401 lines of code)
    • 10 simple units (797 lines of code)
    • 15 very simple units (622 lines of code)
0% | 0% | 22% | 43% | 34%
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% | 22% | 43% | 34%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
usecase-50% | 0% | 48% | 20% | 31%
usecase-40% | 0% | 15% | 40% | 44%
usecase-10% | 0% | 26% | 0% | 73%
usecase-9/templates0% | 0% | 0% | 100% | 0%
site/usecase-70% | 0% | 0% | 74% | 25%
usecase-9/code0% | 0% | 0% | 100% | 0%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def main()
in usecase-5/usecase-5-step-9-cleanup.py
110 21 0
def main()
in usecase-4/usecase-4-step-10-cleanup.py
89 19 0
def main()
in usecase-5/usecase-5-step-6.py
62 15 0
def main()
in usecase-1/usecase-1-cleanup-Step-3.py
59 13 0
def main()
in usecase-5/usecase-5-step-1.py
81 12 0
def main()
in usecase-9/templates/smime-encrypt-cert.py
90 10 0
def main()
in usecase-9/templates/templates.py
70 10 0
def main()
in usecase-9/templates/smime-sign-cert.py
91 10 0
def main()
in site/usecase-7/templates/templates.py
66 9 0
def main()
in usecase-4/usecase-4-step-6.py
102 9 0
def main()
in usecase-4/usecase-4-step-2.py
131 9 0
def main()
in usecase-5/usecase-5-step-2.py
110 8 0
def main()
in site/usecase-7/code/revoke-certs.py
47 7 0
def main()
in usecase-9/code/revoke-certs.py
47 7 0
def main()
in usecase-9/code/create-certs.py
43 6 0
def main()
in site/usecase-7/code/create-certs.py
39 5 0
def main()
in usecase-4/usecase-4-step-3.py
76 5 0
def main()
in usecase-5/usecase-5-step-3.py
59 5 0
def main()
in usecase-1/usecase-1-Step-2.py
53 5 0
def main()
in usecase-4/usecase-4-step-1.py
50 3 0