microsoft / Windows-AppConsult-samples-PWA
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 1,542 units with 15,465 lines of code in units (42.0% of code).
    • 2 very complex units (219 lines of code)
    • 2 complex units (176 lines of code)
    • 40 medium complex units (1,529 lines of code)
    • 116 simple units (2,752 lines of code)
    • 1,382 very simple units (10,789 lines of code)
1% | 1% | 9% | 17% | 69%
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
js1% | 1% | 10% | 17% | 69%
cs0% | 0% | 0% | 25% | 74%
ts0% | 0% | 0% | 36% | 63%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Canvas1% | 1% | 10% | 17% | 69%
AlexaSkill0% | 0% | 0% | 81% | 18%
OneDriveAlexaSkill0% | 0% | 0% | 68% | 31%
WindowsAPIs0% | 0% | 0% | 18% | 81%
ToastActivationWithPushNotifications0% | 0% | 0% | 0% | 100%
MyFullTrustPWA0% | 0% | 0% | 0% | 100%
Docker0% | 0% | 0% | 0% | 100%
ToastActivation0% | 0% | 0% | 0% | 100%
PWADotNetCore0% | 0% | 0% | 0% | 100%
PWAFromScratch0% | 0% | 0% | 0% | 100%
DevCenterNotifications-PWA0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
79 73 1
oneTimeTextBindingAnalyze: function()
in Canvas/CanvasSimple/lib/winjs-4.0.1/js/base.js
140 70 1
function reservedWordLookup()
in Canvas/CanvasSimple/lib/winjs-4.0.1/js/base.js
105 49 1
_keyDownHandler: function _KeyboardBehavior_keyDownHandler()
in Canvas/CanvasSimple/lib/winjs-4.0.1/js/base.js
71 30 1
function declarativeBindImpl()
in Canvas/CanvasSimple/lib/winjs-4.0.1/js/base.js
57 25 6
function run()
in Canvas/CanvasSimple/lib/winjs-4.0.1/js/base.js
73 20 1
function calculateScore()
in Canvas/CanvasSimple/lib/winjs-4.0.1/js/base.js
80 20 5
function fatalErrorHandler()
in Canvas/CanvasSimple/lib/winjs-4.0.1/js/base.js
14 19 1
_hasCursorKeysBehaviors: function Utilities_hasCursorKeysBehaviors()
in Canvas/CanvasSimple/lib/winjs-4.0.1/js/base.js
24 18 1
case isWhitespace()
in Canvas/CanvasSimple/lib/winjs-4.0.1/js/base.js
19 18 1
function readWhitespace()
in Canvas/CanvasSimple/lib/winjs-4.0.1/js/base.js
27 18 3
optimize: function()
in Canvas/CanvasSimple/lib/winjs-4.0.1/js/base.js
73 18 0
function initializeProperties()
in Canvas/CanvasSimple/lib/winjs-4.0.1/js/base.js
45 17 3
function readStringLiteralToken()
in Canvas/CanvasSimple/lib/winjs-4.0.1/js/base.js
44 17 3
function isWhitespace()
in Canvas/CanvasSimple/lib/winjs-4.0.1/js/base.js
22 17 1
function lex()
in Canvas/CanvasSimple/lib/winjs-4.0.1/js/base.js
72 17 4
bindToken: literal()
in Canvas/CanvasSimple/lib/winjs-4.0.1/js/base.js
115 17 1
sourceProperties: literal()
in Canvas/CanvasSimple/lib/winjs-4.0.1/js/base.js
113 17 1
case isLineTerminator()
in Canvas/CanvasSimple/lib/winjs-4.0.1/js/base.js
3 16 1
function notifyError()
in Canvas/CanvasSimple/lib/winjs-4.0.1/js/base.js
42 15 2