microsoft / Simplify-Docx
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 51 units with 464 lines of code in units (34.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (135 lines of code)
    • 5 simple units (76 lines of code)
    • 43 very simple units (253 lines of code)
0% | 0% | 29% | 16% | 54%
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% | 29% | 16% | 54%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/simplify_docx/iterators0% | 0% | 74% | 0% | 25%
src/simplify_docx/utils0% | 0% | 33% | 17% | 48%
src/simplify_docx/elements0% | 0% | 0% | 28% | 71%
src/simplify_docx0% | 0% | 0% | 0% | 100%
src/simplify_docx/types0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def xml_iter()
in src/simplify_docx/iterators/generic.py
45 24 3
def walk()
in src/simplify_docx/utils/walk.py
48 19 4
def build_iterators()
in src/simplify_docx/iterators/generic.py
42 16 0
def merge_run_contents()
in src/simplify_docx/elements/paragraph.py
24 9 4
def get_paragraph_ind()
in src/simplify_docx/utils/paragrapy_style.py
15 8 2
def update()
in src/simplify_docx/elements/form.py
17 7 2
def _walk()
in src/simplify_docx/utils/friendly_names.py
10 7 2
def get_val()
in src/simplify_docx/elements/base.py
10 6 1
def __init__()
in src/simplify_docx/elements/form.py
23 5 2
def skip_range()
in src/simplify_docx/iterators/generic.py
11 5 3
def get_num_style()
in src/simplify_docx/utils/paragrapy_style.py
12 5 2
def to_json()
in src/simplify_docx/elements/base.py
11 4 5
def __iter__()
in src/simplify_docx/elements/base.py
8 4 1
def __init__()
in src/simplify_docx/elements/form.py
11 4 2
def to_json()
in src/simplify_docx/elements/form.py
9 4 4
def get_tag()
in src/simplify_docx/utils/tag.py
16 4 2
def simplify()
in src/simplify_docx/__init__.py
11 3 3
def __init__()
in src/simplify_docx/elements/base.py
7 3 2
def _update_from()
in src/simplify_docx/elements/form.py
5 3 5
def register_iterator()
in src/simplify_docx/iterators/generic.py
19 3 13