aws-samples / aws-modernization-with-hashicorp-terraform
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 51 units with 400 lines of code in units (10.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (22 lines of code)
    • 2 simple units (63 lines of code)
    • 48 very simple units (315 lines of code)
0% | 0% | 5% | 15% | 78%
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% | 15% | 78%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
public/js0% | 0% | 5% | 15% | 78%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
highlight: function()
in public/js/learn.js
22 11 4
jQuery()
in public/js/learn.js
33 8 1
30 6 2
scrollIfAnchor: function()
in public/js/learn.js
15 5 2
function fallbackMessage()
in public/js/learn.js
14 4 1
jQuery()
in public/js/learn.js
11 4 1
$()
in public/js/learn.js
18 4 1
var debounce = function()
in public/js/learn.js
6 3 3
jQuery()
in public/js/learn.js
11 3 1
jQuery()
in public/js/learn.js
5 3 1
jQuery()
in public/js/learn.js
8 3 1
scrollToCurrent: function()
in public/js/learn.js
5 3 1
jQuery()
in public/js/learn.js
7 3 1
function initLunr()
in public/js/search.js
30 2 0
renderItem: function()
in public/js/search.js
16 2 2
function getScrollBarWidth()
in public/js/learn.js
21 2 0
(function($, sr)()
in public/js/learn.js
3 2 2
function delayed()
in public/js/learn.js
5 2 0
jQuery()
in public/js/learn.js
5 2 1
jQuery()
in public/js/learn.js
5 2 1