microsoft / federalist
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 257 units with 3,311 lines of code in units (60.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (169 lines of code)
    • 29 simple units (766 lines of code)
    • 224 very simple units (2,376 lines of code)
0% | 0% | 5% | 23% | 71%
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% | 5% | 23% | 71%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
api/services0% | 0% | 26% | 33% | 39%
api/models0% | 0% | 15% | 33% | 50%
assets/app0% | 0% | 0% | 19% | 80%
api/controllers0% | 0% | 0% | 59% | 40%
api/policies0% | 0% | 0% | 81% | 18%
tasks/config0% | 0% | 0% | 0% | 100%
api/hooks0% | 0% | 0% | 0% | 100%
migrations0% | 0% | 0% | 0% | 100%
tasks/register0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
config0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
passport.connect = function()
in api/services/passport.js
67 20 4
afterCreate: function()
in api/models/Build.js
20 12 2
addJob: function()
in api/services/SQS.js
58 11 1
passport.callback = function()
in api/services/passport.js
24 11 3
function tryAgain()
in api/controllers/AuthController.js
25 10 1
github: function()
in api/controllers/WebhookController.js
25 10 2
module.exports = function()
in api/policies/filterCurrentUser.js
35 10 3
module.exports = function()
in api/policies/sessionAuth.js
20 10 3
passport.loadStrategies = function()
in api/services/passport.js
41 10 0
exports.register = function()
in api/services/protocols/local.js
49 10 3
url: function()
in assets/app/models/Github.js
18 10 1
clone: function clone()
in assets/app/models/Github.js
61 10 3
completeJob: function()
in api/models/Build.js
16 8 3
exports.login = function()
in api/services/protocols/local.js
45 8 4
update: function()
in assets/app/views/editor/edit-main.js
50 8 0
render: function()
in assets/app/views/site/builds.js
26 8 0
proxy: function()
in api/controllers/PreviewController.js
20 7 3
registerSite: function()
in api/models/Site.js
18 7 2
module.exports = function()
in api/policies/previewProxy.js
14 7 3
initializeContentEditor: function()
in assets/app/views/editor/edit-file.js
21 7 2