microsoft / windows-admin-center-sdk
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 123 units with 1,328 lines of code in units (65.6% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (159 lines of code)
    • 16 medium size units (532 lines of code)
    • 11 small units (183 lines of code)
    • 93 very small units (454 lines of code)
0% | 11% | 40% | 13% | 34%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 15% | 41% | 13% | 29%
ts0% | 8% | 39% | 14% | 37%
cs0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Ux/gulps/gulp-svg-code0% | 30% | 33% | 10% | 24%
Ux/gulps/gulp-resjson0% | 14% | 52% | 10% | 23%
Ux/gulps/gulp-ps-code0% | 0% | 45% | 11% | 43%
Ux/gulps/gulp-merge-json-in-folders0% | 0% | 42% | 24% | 32%
Ux/tools0% | 0% | 0% | 66% | 33%
Ux/src/app0% | 0% | 0% | 0% | 100%
Ux/src/test-util0% | 0% | 0% | 0% | 100%
Plugin0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private addData()
in GatewayPluginExample/Ux/gulps/gulp-svg-code/svg-code-convert.ts
55 10 2
function()
in GatewayPluginExample/Ux/gulps/gulp-resjson/index.js
52 12 3
function gulpSvgCode()
in GatewayPluginExample/Ux/gulps/gulp-svg-code/index.js
52 8 0
function()
in GatewayPluginExample/Ux/gulps/gulp-resjson/index.ts
50 12 3
var _loop_1 = function()
in GatewayPluginExample/Ux/gulps/gulp-svg-code/svg-code-convert.js
46 8 1
private addData()
in GatewayPluginExample/Ux/gulps/gulp-ps-code/ps-code-convert.ts
44 11 1
var _loop_1 = function()
in GatewayPluginExample/Ux/gulps/gulp-ps-code/ps-code-convert.js
43 10 1
ResJsonConverter.prototype.traverse = function()
in GatewayPluginExample/Ux/gulps/gulp-resjson/resjson-convert.js
40 6 2
private traverse()
in GatewayPluginExample/Ux/gulps/gulp-resjson/resjson-convert.ts
37 6 2
function gulpPsCode()
in GatewayPluginExample/Ux/gulps/gulp-ps-code/index.js
35 7 1
ResJsonConverter.prototype.convert = function()
in GatewayPluginExample/Ux/gulps/gulp-resjson/resjson-convert.js
34 9 1
public convert()
in GatewayPluginExample/Ux/gulps/gulp-resjson/resjson-convert.ts
31 9 1
JsonMerge.prototype.mergeJsonInFolders = function()
in GatewayPluginExample/Ux/gulps/gulp-merge-json-in-folders/json-merge.js
27 1 2
function()
in GatewayPluginExample/Ux/gulps/gulp-svg-code/index.ts
27 8 3
public mergeJsonInFolders()
in GatewayPluginExample/Ux/gulps/gulp-merge-json-in-folders/json-merge.ts
26 1 2
JsonMerge.prototype.extend = function()
in GatewayPluginExample/Ux/gulps/gulp-merge-json-in-folders/json-merge.js
24 9 2
private extend()
in GatewayPluginExample/Ux/gulps/gulp-merge-json-in-folders/json-merge.ts
24 9 2
SvgCodeConverter.prototype.createStructure = function()
in GatewayPluginExample/Ux/gulps/gulp-svg-code/svg-code-convert.js
23 4 2
private createStructure()
in GatewayPluginExample/Ux/gulps/gulp-svg-code/svg-code-convert.ts
21 4 2
ResJsonConverter.prototype.scan = function()
in GatewayPluginExample/Ux/gulps/gulp-resjson/resjson-convert.js
20 5 1