microsoft / powerbi-visuals-package-validator
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 20 units with 278 lines of code in units (57.0% of code).
    • 1 very long units (102 lines of code)
    • 0 long units (0 lines of code)
    • 0 medium size units (0 lines of code)
    • 8 small units (107 lines of code)
    • 11 very small units (69 lines of code)
36% | 0% | 0% | 38% | 24%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js36% | 0% | 0% | 38% | 24%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
tasks38% | 0% | 0% | 35% | 26%
ROOT0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function checkPackage()
in tasks/check-package.js
102 34 3
function consolePrint()
in tasks/console-print.js
17 7 3
function checkCSS()
in tasks/check-css.js
15 2 2
request()
in tasks/check-package.js
15 7 4
run: function()
in gulpfile.js
14 1 2
isURL: function isURL()
in tasks/check-package.js
12 2 1
function checkSecurityJS()
in tasks/check-security-js.js
12 4 2
log: function log()
in tasks/check-package.js
11 1 3
function checkTS()
in tasks/check-ts.js
11 2 1
9 2 1
8 3 1
function myStylelintFormatter()
in tasks/check-css.js
7 1 0
isVersion: function isVersion()
in tasks/check-package.js
7 2 1
isEmail: function isEmail()
in tasks/check-package.js
7 2 1
isImage: function isImage()
in tasks/check-package.js
6 2 1
isSVG: function isSVG()
in tasks/check-package.js
6 2 1
var populate = function()
in tasks/check-security-js.js
6 1 1
5 1 1
isImageSize: function isImageSize()
in tasks/check-package.js
5 2 2
3 1 1