google / docsy
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 18 units with 290 lines of code in units (5.7% of code).
    • 1 very long units (140 lines of code)
    • 0 long units (0 lines of code)
    • 2 medium size units (47 lines of code)
    • 4 small units (54 lines of code)
    • 11 very small units (49 lines of code)
48% | 0% | 16% | 18% | 16%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js48% | 0% | 16% | 18% | 16%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
assets/js48% | 0% | 16% | 18% | 16%
Alternative Visuals
Longest Units
Top 18 longest units
Unit# linesMcCabe index# params
$()
in assets/js/offline-search.js
140 5 1
var handler = function()
in assets/js/drawio.js
24 9 1
$()
in assets/js/anchor.js
23 3 1
var imghandler = function()
in assets/js/drawio.js
18 2 2
var norm = function()
in assets/js/mermaid.js
14 5 2
$()
in assets/js/base.js
11 2 1
(function($)()
in assets/js/mermaid.js
11 2 1
$()
in assets/js/base.js
7 1 1
var insertFrame = function()
in assets/js/drawio.js
7 1 0
var closeFrame = function()
in assets/js/drawio.js
7 2 0
(function($)()
in assets/js/markmap.js
7 2 1
$()
in assets/js/markmap.js
4 1 1
$()
in assets/js/mermaid.js
4 1 1
(function ($)()
in assets/js/anchor.js
3 1 1
(function($)()
in assets/js/base.js
3 1 1
function bottomPos()
in assets/js/base.js
3 1 1
(function ($)()
in assets/js/offline-search.js
3 1 1
$()
in assets/js/base.js
1 2 1