microsoft / windows-admin-center-extension-template
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 177 units with 2,040 lines of code in units (66.8% of code).
    • 1 very long units (125 lines of code)
    • 4 long units (229 lines of code)
    • 22 medium size units (703 lines of code)
    • 22 small units (349 lines of code)
    • 128 very small units (634 lines of code)
6% | 11% | 34% | 17% | 31%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js11% | 16% | 36% | 12% | 22%
ts0% | 5% | 31% | 21% | 40%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src30% | 17% | 29% | 12% | 9%
templates/legacy/windows-admin-center-extension-template/gulps0% | 13% | 43% | 13% | 29%
templates/windows-admin-center-extension-template/gulpfile.ts/common0% | 0% | 8% | 37% | 53%
templates/windows-admin-center-extension-template/gulpfile.ts0% | 0% | 84% | 0% | 15%
templates/legacy/windows-admin-center-extension-template/tools0% | 0% | 0% | 66% | 33%
templates/legacy/windows-admin-center-extension-template/src0% | 0% | 0% | 0% | 100%
templates/windows-admin-center-extension-template/src/app0% | 0% | 0% | 0% | 100%
templates/windows-admin-center-extension-template/src0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function buildElements()
in src/update-version.js
125 1 0
function writePackageJsonUpdate()
in src/update-version.js
70 2 0
private addData()
in templates/legacy/windows-admin-center-extension-template/gulps/gulp-svg-code/svg-code-convert.ts
55 10 2
function()
in templates/legacy/windows-admin-center-extension-template/gulps/gulp-resjson/index.js
52 12 3
function gulpSvgCode()
in templates/legacy/windows-admin-center-extension-template/gulps/gulp-svg-code/index.js
52 8 0
function()
in templates/legacy/windows-admin-center-extension-template/gulps/gulp-resjson/index.ts
50 12 3
function updateFiles()
in src/index.js
48 6 4
var _loop_1 = function()
in templates/legacy/windows-admin-center-extension-template/gulps/gulp-svg-code/svg-code-convert.js
46 8 1
private addData()
in templates/legacy/windows-admin-center-extension-template/gulps/gulp-ps-code/ps-code-convert.ts
44 11 1
var _loop_1 = function()
in templates/legacy/windows-admin-center-extension-template/gulps/gulp-ps-code/ps-code-convert.js
43 10 1
ResJsonConverter.prototype.traverse = function()
in templates/legacy/windows-admin-center-extension-template/gulps/gulp-resjson/resjson-convert.js
40 6 2
private traverse()
in templates/legacy/windows-admin-center-extension-template/gulps/gulp-resjson/resjson-convert.ts
37 6 2
function gulpPsCode()
in templates/legacy/windows-admin-center-extension-template/gulps/gulp-ps-code/index.js
35 7 1
ResJsonConverter.prototype.convert = function()
in templates/legacy/windows-admin-center-extension-template/gulps/gulp-resjson/resjson-convert.js
34 9 1
public convert()
in templates/legacy/windows-admin-center-extension-template/gulps/gulp-resjson/resjson-convert.ts
31 9 1
function create()
in src/index.js
27 5 5
JsonMerge.prototype.mergeJsonInFolders = function()
in templates/legacy/windows-admin-center-extension-template/gulps/gulp-merge-json-in-folders/json-merge.js
27 1 2
function()
in templates/legacy/windows-admin-center-extension-template/gulps/gulp-svg-code/index.ts
27 8 3
export function ng()
in templates/windows-admin-center-extension-template/gulpfile.ts/common/utilities.ts
27 5 4
26 11 0