microsoft / typed-rest-client
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 84 units with 1,045 lines of code in units (71.4% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (57 lines of code)
    • 4 medium complex units (197 lines of code)
    • 6 simple units (141 lines of code)
    • 73 very simple units (650 lines of code)
0% | 5% | 18% | 13% | 62%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
ts0% | 8% | 28% | 17% | 44%
js0% | 0% | 0% | 5% | 94%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib0% | 10% | 35% | 21% | 33%
ROOT0% | 0% | 0% | 14% | 85%
lib/opensource/Node-SMB/lib0% | 0% | 0% | 0% | 100%
lib/handlers0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private _getAgent()
in lib/HttpClient.ts
57 26 1
public async request()
in lib/HttpClient.ts
64 25 4
constructor()
in lib/HttpClient.ts
56 20 3
52 15 2
private _prepareRequest()
in lib/HttpClient.ts
25 11 3
25 10 3
41 9 4
private _getProxy()
in lib/HttpClient.ts
28 9 1
10 9 1
private _headersFromOptions()
in lib/RestClient.ts
17 8 2
function findLicense()
in generate-third-party-notice.js
20 7 1
private _isPresigned()
in lib/HttpClient.ts
11 5 1
12 5 1
6 5 1
public canHandleAuthentication()
in lib/handlers/ntlm.ts
7 5 1
private sendType3Message()
in lib/handlers/ntlm.ts
36 5 5
private _mergeHeaders()
in lib/HttpClient.ts
11 4 1
function decodeType2()
in lib/opensource/Node-SMB/lib/ntlm.js
11 4 1
12 3 1
9 3 2