microsoft / window-post-message-proxy
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 11 units with 139 lines of code in units (37.3% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (86 lines of code)
    • 0 medium size units (0 lines of code)
    • 1 small units (13 lines of code)
    • 9 very small units (40 lines of code)
0% | 61% | 0% | 9% | 28%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 61% | 0% | 9% | 28%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 61% | 0% | 9% | 28%
Alternative Visuals
Longest Units
Top 11 longest units
Unit# linesMcCabe index# params
private onMessageReceived()
in src/windowPostMessageProxy.ts
86 22 1
private static createDeferred()
in src/windowPostMessageProxy.ts
13 1 0
private sendResponse()
in src/windowPostMessageProxy.ts
8 2 3
removeHandler()
in src/windowPostMessageProxy.ts
7 2 1
private static createRandomString()
in src/windowPostMessageProxy.ts
6 2 0
static defaultAddTrackingProperties()
in src/windowPostMessageProxy.ts
4 1 2
static defaultGetTrackingProperties()
in src/windowPostMessageProxy.ts
3 1 1
static defaultIsErrorMessage()
in src/windowPostMessageProxy.ts
3 1 1
addHandler()
in src/windowPostMessageProxy.ts
3 1 1
start()
in src/windowPostMessageProxy.ts
3 1 0
stop()
in src/windowPostMessageProxy.ts
3 1 0