aws-samples / protecting-workloads-workshop
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 177 units with 2,120 lines of code in units (22.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 9 medium complex units (278 lines of code)
    • 27 simple units (908 lines of code)
    • 141 very simple units (934 lines of code)
0% | 0% | 13% | 42% | 44%
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% | 13% | 44% | 42%
php0% | 0% | 0% | 0% | 100%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
app/html/libs/bootstrap/js0% | 0% | 19% | 29% | 50%
app/html/libs/bootstrap0% | 0% | 0% | 95% | 5%
app/html/libs/bootstrap/grunt0% | 0% | 0% | 35% | 65%
app/html/modules0% | 0% | 0% | 0% | 100%
artifacts0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
Tooltip.prototype.show = function()
in app/html/libs/bootstrap/js/tooltip.js
50 21 0
Modal.prototype.backdrop = function()
in app/html/libs/bootstrap/js/modal.js
37 16 1
Dropdown.prototype.keydown = function()
in app/html/libs/bootstrap/js/dropdown.js
21 15 1
Affix.prototype.getState = function()
in app/html/libs/bootstrap/js/affix.js
16 14 4
Collapse.prototype.show = function()
in app/html/libs/bootstrap/js/collapse.js
30 13 0
Tooltip.prototype.init = function()
in app/html/libs/bootstrap/js/tooltip.js
26 12 3
Affix.prototype.checkPosition = function()
in app/html/libs/bootstrap/js/affix.js
30 11 0
ScrollSpy.prototype.process = function()
in app/html/libs/bootstrap/js/scrollspy.js
25 11 0
Carousel.prototype.slide = function()
in app/html/libs/bootstrap/js/carousel.js
43 11 2
Tokenizer.prototype._shift = function()
in app/html/libs/bootstrap/grunt/bs-lessdoc-parser.js
41 10 0
Alert.prototype.close = function()
in app/html/libs/bootstrap/js/alert.js
21 9 1
Tooltip.prototype.enter = function()
in app/html/libs/bootstrap/js/tooltip.js
16 9 1
Tooltip.prototype.getPosition = function()
in app/html/libs/bootstrap/js/tooltip.js
17 9 1
Tooltip.prototype.getViewportAdjustedDelta = function()
in app/html/libs/bootstrap/js/tooltip.js
24 9 4
ScrollSpy.prototype.refresh = function()
in app/html/libs/bootstrap/js/scrollspy.js
28 8 0
Tooltip.prototype.leave = function()
in app/html/libs/bootstrap/js/tooltip.js
13 8 1
Tooltip.prototype.applyPlacement = function()
in app/html/libs/bootstrap/js/tooltip.js
27 8 2
Modal.prototype.show = function()
in app/html/libs/bootstrap/js/modal.js
41 8 1
$()
in app/html/libs/bootstrap/js/modal.js
14 8 1
module.exports = function()
in app/html/libs/bootstrap/Gruntfile.js
418 8 1