aws-samples / aws-secrets-manager-acm-certificate-rotation
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 2,632 units with 21,858 lines of code in units (74.5% of code).
    • 1 very complex units (128 lines of code)
    • 12 complex units (1,356 lines of code)
    • 55 medium complex units (2,900 lines of code)
    • 163 simple units (3,742 lines of code)
    • 2,401 very simple units (13,732 lines of code)
<1% | 6% | 13% | 17% | 62%
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
py<1% | 6% | 13% | 16% | 63%
h0% | 0% | 27% | 29% | 43%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Lambda/Layer/crypto/python/lib/python3.8/site-packages/pycparser/ply3% | 13% | 41% | 15% | 25%
Lambda/Layer/crypto/python/lib/python3.8/site-packages/cffi0% | 15% | 14% | 26% | 43%
Lambda/Layer/crypto/python/lib/python3.8/site-packages/cryptography/hazmat0% | 0% | 4% | 14% | 81%
Lambda/Layer/crypto/python/lib/python3.8/site-packages/pycparser0% | 0% | 8% | 5% | 86%
Lambda/Layer/crypto/python/lib/python3.8/site-packages/cryptography/x5090% | 0% | 3% | 14% | 81%
Lambda/Layer/crypto/python/lib/python3.8/site-packages0% | 0% | 15% | 8% | 75%
Lambda/Layer/crypto/python/lib/python3.8/site-packages/pem0% | 0% | 48% | 0% | 51%
Lambda/Function0% | 0% | 0% | 62% | 37%
Lambda/Layer/crypto/python/lib/python3.8/site-packages/cryptography0% | 0% | 0% | 10% | 89%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def lex()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/pycparser/ply/lex.py
128 54 6
def lr_parse_table()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/pycparser/ply/yacc.py
139 41 1
def parsegen()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/pycparser/ply/cpp.py
107 38 3
def _generate_cpy_function_decl()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/cffi/recompiler.py
139 37 3
def new_primitive_type()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/cffi/backend_ctypes.py
137 36 2
def _parse_constant()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/cffi/cparser.py
64 35 3
def new_array_type()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/cffi/backend_ctypes.py
106 29 3
def _get_type_and_quals()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/cffi/cparser.py
79 28 5
def _struct_ctx()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/cffi/recompiler.py
84 26 5
def new_pointer_type()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/cffi/backend_ctypes.py
84 26 2
def complete_struct_or_union()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/cffi/backend_ctypes.py
103 26 8
def _make_ffi_library()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/cffi/api.py
110 26 3
def yacc()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/pycparser/ply/yacc.py
204 26 13
def add_production()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/pycparser/ply/yacc.py
60 25 6
def validate_pfunctions()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/pycparser/ply/yacc.py
49 25 1
def define()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/pycparser/ply/cpp.py
58 25 2
def validate_rules()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/pycparser/ply/lex.py
78 24 1
def _parse_decl()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/cffi/cparser.py
46 23 2
def compute_lookback_includes()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/pycparser/ply/yacc.py
47 23 4
def _generate_type()
in Lambda/Layer/crypto/python/lib/python3.8/site-packages/pycparser/c_generator.py
40 22 4