microsoft / IIS.WebManager
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 1,891 units with 13,916 lines of code in units (41.4% of code).
    • 1 very long units (114 lines of code)
    • 3 long units (184 lines of code)
    • 73 medium size units (2,016 lines of code)
    • 305 small units (4,224 lines of code)
    • 1,509 very small units (7,378 lines of code)
<1% | 1% | 14% | 30% | 53%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts<1% | 1% | 14% | 30% | 53%
js0% | 0% | 71% | 0% | 28%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/app/common6% | 3% | 11% | 21% | 55%
src/app/utils0% | 38% | 22% | 25% | 13%
src/app/webserver0% | 0% | 9% | 32% | 57%
src/app/files0% | 0% | 27% | 29% | 42%
src/app/runtime0% | 0% | 48% | 28% | 22%
src/app/connect0% | 0% | 22% | 42% | 34%
src0% | 0% | 71% | 0% | 28%
src/app/certificates0% | 0% | 15% | 19% | 64%
src/app/notification0% | 0% | 9% | 30% | 60%
src/app/versioning0% | 0% | 26% | 47% | 26%
src/app/main0% | 0% | 0% | 28% | 71%
src/app/diagnostics0% | 0% | 0% | 75% | 25%
src/app/settings0% | 0% | 0% | 0% | 100%
src/app/header0% | 0% | 0% | 0% | 100%
src/app/error0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public static async LoadAsync()
in src/app/common/component-loader.ts
114 27 2
private apiErrorFromHttp()
in src/app/common/http-client.ts
65 23 1
public static getUrlMatch()
in src/app/utils/url.ts
63 19 2
public static diff()
in src/app/utils/diff.ts
56 27 2
An outbound rule can operate on the response body content or the content of an HTTP header()
in src/app/webserver/url-rewrite/outbound-rules/outbound-rule-type.ts
50 1 1
public invoke()
in src/app/runtime/wac/services/powershell-service.ts
48 16 3
private GetApiKey()
in src/app/runtime/runtime.wac.ts
44 8 0
private performRequest()
in src/app/common/http-client.ts
37 4 4
private ping()
in src/app/connect/connect.service.ts
37 5 3
function merge()
in src/gulpfile.js
37 11 2
private getAllByRange()
in src/app/certificates/certificates.service.ts
36 7 2
get server()
in src/app/webserver/webserver.component.ts
34 3 0
private createDiffEditor()
in src/app/files/code-editor.component.ts
33 9 1
private uploadInternal()
in src/app/files/files.service.ts
33 5 2
private initialize()
in src/app/webserver/modules/modules.component.ts
33 7 0
activate()
in src/app/webserver/vdirs/vdir-list.component.ts
33 9 0
ngAfterViewInit()
in src/app/files/code-editor.component.ts
32 5 0
private uploadFileSystemDirectoryEntry()
in src/app/files/files.service.ts
32 3 2
private performCopy()
in src/app/files/files.service.ts
32 4 3
public install()
in src/app/runtime/wac/components/install.component.ts
32 7 0