aws-samples / service-screener
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 546 units with 7,543 lines of code in units (52.7% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (309 lines of code)
    • 15 medium complex units (894 lines of code)
    • 54 simple units (1,741 lines of code)
    • 474 very simple units (4,599 lines of code)
0% | 4% | 11% | 23% | 60%
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% | 7% | 14% | 19% | 57%
php0% | 0% | 8% | 26% | 64%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
adminlte/html0% | 7% | 14% | 19% | 57%
services/ec20% | 0% | 13% | 15% | 70%
tools0% | 0% | 15% | 10% | 74%
ROOT0% | 0% | 21% | 60% | 17%
services/rds0% | 0% | 7% | 31% | 61%
services/iam0% | 0% | 5% | 36% | 57%
services0% | 0% | 0% | 30% | 69%
services/dashboard0% | 0% | 0% | 60% | 39%
services/s30% | 0% | 0% | 19% | 80%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
Defaults.prototype.apply = function()
in adminlte/html/plugins/select2/js/select2.full.js
164 33 1
function normalize()
in adminlte/html/plugins/select2/js/select2.full.js
68 32 2
function handler()
in adminlte/html/plugins/select2/js/select2.full.js
77 28 1
protected function __checkPostgresParam()
in services/rds/drivers/rds_postgres.class.php
27 25 0
Results.prototype.bind = function()
in adminlte/html/plugins/select2/js/select2.full.js
142 22 2
Options.prototype.fromElement = function()
in adminlte/html/plugins/select2/js/select2.full.js
69 22 1
function advise()
in services/ec2/ec2.class.php
107 22 0
main = function()
in adminlte/html/plugins/select2/js/select2.full.js
27 20 4
x: $()
in adminlte/html/plugins/select2/js/select2.full.js
111 19 1
function getSummary()
in tools/reporter.class.php
63 16 0
AttachBody.prototype._positionDropdown = function()
in adminlte/html/plugins/select2/js/select2.full.js
63 16 0
Select2.prototype._registerEvents = function()
in adminlte/html/plugins/select2/js/select2.full.js
65 16 0
Results.prototype.option = function()
in adminlte/html/plugins/select2/js/select2.full.js
57 14 1
Select2.prototype._isChangeMutation = function()
in adminlte/html/plugins/select2/js/select2.full.js
31 14 2
function checkPortOpenAll()
in services/ec2/drivers/ec2_sg.class.php
37 13 3
function scanByService()
in bootstrap.inc.php
36 12 3
Select2.prototype._resolveWidth = function()
in adminlte/html/plugins/select2/js/select2.full.js
37 11 2
function passwordPolicyScoring()
in services/iam/drivers/iam_setting.class.php
22 11 1
requirejs = require = req = function()
in adminlte/html/plugins/select2/js/select2.full.js
30 10 5
function request()
in adminlte/html/plugins/select2/js/select2.full.js
23 10 0