microsoft / Simplify-Docx
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 51 units with 464 lines of code in units (34.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 5 medium size units (182 lines of code)
    • 10 small units (142 lines of code)
    • 36 very small units (140 lines of code)
0% | 0% | 39% | 30% | 30%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 39% | 30% | 30%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/simplify_docx/iterators0% | 0% | 74% | 25% | 0%
src/simplify_docx/utils0% | 0% | 33% | 43% | 22%
src/simplify_docx/elements0% | 0% | 25% | 21% | 52%
src/simplify_docx0% | 0% | 0% | 100% | 0%
src/simplify_docx/types0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def walk()
in src/simplify_docx/utils/walk.py
48 19 4
def xml_iter()
in src/simplify_docx/iterators/generic.py
45 24 3
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 __init__()
in src/simplify_docx/elements/form.py
23 5 2
def register_iterator()
in src/simplify_docx/iterators/generic.py
19 3 13
def __set_EG_PContents__()
in src/simplify_docx/utils/set_options.py
19 3 5
def update()
in src/simplify_docx/elements/form.py
17 7 2
def get_tag()
in src/simplify_docx/utils/tag.py
16 4 2
def get_paragraph_ind()
in src/simplify_docx/utils/paragrapy_style.py
15 8 2
def get_num_style()
in src/simplify_docx/utils/paragrapy_style.py
12 5 2
def simplify()
in src/simplify_docx/__init__.py
11 3 3
def to_json()
in src/simplify_docx/elements/base.py
11 4 5
def __init__()
in src/simplify_docx/elements/form.py
11 4 2
def skip_range()
in src/simplify_docx/iterators/generic.py
11 5 3
def get_val()
in src/simplify_docx/elements/base.py
10 6 1
def to_json()
in src/simplify_docx/elements/base.py
10 2 5
def _walk()
in src/simplify_docx/utils/friendly_names.py
10 7 2
def to_json()
in src/simplify_docx/elements/form.py
9 4 4
def __iter__()
in src/simplify_docx/elements/base.py
8 4 1