microsoft / cordova-simulate
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 431 units with 4,500 lines of code in units (28.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 9 medium complex units (362 lines of code)
    • 31 simple units (864 lines of code)
    • 391 very simple units (3,274 lines of code)
0% | 0% | 8% | 19% | 72%
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
js0% | 0% | 8% | 19% | 72%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/server0% | 0% | 7% | 20% | 71%
src/modules0% | 0% | 11% | 15% | 72%
src/app-host0% | 0% | 30% | 17% | 51%
src/sim-host0% | 0% | 4% | 18% | 77%
tools/i18n0% | 0% | 0% | 30% | 69%
src/plugins0% | 0% | 0% | 11% | 88%
src/platforms0% | 0% | 0% | 0% | 100%
src0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function setCordovaAndInitialize()
in src/app-host/app-host.js
88 17 1
getDirection: function()
in src/modules/utils.js
24 16 1
copy: function()
in src/modules/utils.js
33 14 1
initialize: function()
in src/sim-host/ui/custom-elements.js
33 14 0
function getAppDataPath()
in src/server/utils/jsUtils.js
28 13 0
validateArgumentType: function()
in src/modules/utils.js
35 11 5
58 11 0
53 11 1
function parseFontSize()
in src/server/theme.js
10 11 1
function getUserAgent()
in src/server/device.js
23 10 1
function handleWatcherEvent()
in src/server/live-reload/watcher.js
23 10 2
function parseOptions()
in src/server/simulator.js
25 10 1
63 10 1
function compareArrays()
in src/server/utils/jsUtils.js
33 10 3
module.exports.initialize = function()
in src/sim-host/protocol/socket.js
69 10 2
function updateLanguageXlfJson()
in tools/i18n/update.js
36 10 2
function checkArgs()
in src/modules/argscheck.js
28 9 4
function shouldUsePluginWithDebugHost()
in src/server/utils/plugins.js
25 9 3
function _simulateTouchEvent()
in src/app-host/touch-events.js
38 8 2
Object.assign = function()
in src/modules/polyfills.js
18 8 1