aws-samples / aws-waf-dashboard
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 1,157 units with 17,916 lines of code in units (65.4% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (195 lines of code)
    • 39 medium complex units (1,566 lines of code)
    • 127 simple units (2,376 lines of code)
    • 988 very simple units (13,779 lines of code)
0% | 1% | 8% | 13% | 76%
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% | 1% | 8% | 13% | 76%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
cloudformation-custom-resources/kibana-customizer-lambda/urllib30% | 2% | 14% | 24% | 58%
cloudformation-custom-resources/kibana-customizer-lambda/requests0% | 4% | 23% | 23% | 48%
cloudformation-custom-resources/kibana-customizer-lambda/idna0% | 0% | 1% | 1% | 96%
cloudformation-custom-resources/kibana-customizer-lambda/chardet0% | 0% | 14% | 25% | 60%
cloudformation-custom-resources/kibana-customizer-lambda/requests_aws4auth0% | 0% | 15% | 20% | 63%
cloudformation-custom-resources/kibana-customizer-lambda/crhelper0% | 0% | 0% | 24% | 75%
cloudformation-custom-resources/es-cognito-auth-lambda/crhelper0% | 0% | 0% | 24% | 75%
cloudformation-custom-resources/domain-setter-lambda/crhelper0% | 0% | 0% | 24% | 75%
cloudformation-custom-resources/kibana-customizer-lambda0% | 0% | 0% | 0% | 100%
cloudformation-custom-resources/es-cognito-auth-lambda0% | 0% | 0% | 0% | 100%
cloudformation-custom-resources/domain-setter-lambda0% | 0% | 0% | 0% | 100%
cloudformation-custom-resources/kibana-customizer-lambda/certifi0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def parse_url()
in cloudformation-custom-resources/kibana-customizer-lambda/urllib3/util/url.py
62 27 1
def ssl_wrap_socket()
in cloudformation-custom-resources/kibana-customizer-lambda/urllib3/util/ssl_.py
41 27 11
def send()
in cloudformation-custom-resources/kibana-customizer-lambda/requests/adapters.py
92 26 7
def valid_contexto()
in cloudformation-custom-resources/kibana-customizer-lambda/idna/core.py
32 23 3
def urlopen()
in cloudformation-custom-resources/kibana-customizer-lambda/urllib3/contrib/appengine.py
74 23 9
def build_digest_header()
in cloudformation-custom-resources/kibana-customizer-lambda/requests/auth.py
80 23 3
def print_()
in cloudformation-custom-resources/kibana-customizer-lambda/requests_aws4auth/six.py
50 22 2
def increment()
in cloudformation-custom-resources/kibana-customizer-lambda/urllib3/util/retry.py
47 22 7
def print_()
in cloudformation-custom-resources/kibana-customizer-lambda/urllib3/packages/six.py
50 22 2
def feed()
in cloudformation-custom-resources/kibana-customizer-lambda/chardet/universaldetector.py
66 22 2
def resolve_redirects()
in cloudformation-custom-resources/kibana-customizer-lambda/requests/sessions.py
69 22 10
def check_bidi()
in cloudformation-custom-resources/kibana-customizer-lambda/idna/core.py
44 21 2
def urlopen()
in cloudformation-custom-resources/kibana-customizer-lambda/urllib3/connectionpool.py
115 21 14
def prepare_url()
in cloudformation-custom-resources/kibana-customizer-lambda/requests/models.py
55 20 3
def connect()
in cloudformation-custom-resources/kibana-customizer-lambda/urllib3/connection.py
59 19 1
def uts46_remap()
in cloudformation-custom-resources/kibana-customizer-lambda/idna/core.py
25 18 3
def _read_callback()
in cloudformation-custom-resources/kibana-customizer-lambda/urllib3/contrib/securetransport.py
41 16 3
def guess_json_utf()
in cloudformation-custom-resources/kibana-customizer-lambda/requests/utils.py
22 16 1
def urlopen()
in cloudformation-custom-resources/kibana-customizer-lambda/urllib3/poolmanager.py
36 15 5
def feed()
in cloudformation-custom-resources/kibana-customizer-lambda/chardet/hebrewprober.py
18 15 2