aws-quickstart / quickstart-fortinet-fortigate
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 849 units with 16,225 lines of code in units (63.1% of code).
    • 6 very complex units (1,791 lines of code)
    • 3 complex units (342 lines of code)
    • 70 medium complex units (5,277 lines of code)
    • 82 simple units (2,662 lines of code)
    • 688 very simple units (6,153 lines of code)
11% | 2% | 32% | 16% | 37%
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
js11% | 2% | 32% | 16% | 37%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
functions/source/fgt-asg-handler/lib/core27% | 0% | 25% | 7% | 39%
functions/source/nic-attachment/lib/core27% | 0% | 25% | 7% | 39%
functions/source/faz-handler/lib/core27% | 0% | 25% | 7% | 39%
functions/source/fgt-asg-handler/lib/aws0% | 3% | 39% | 23% | 33%
functions/source/nic-attachment/lib/aws0% | 3% | 39% | 23% | 33%
functions/source/faz-handler/lib/aws0% | 3% | 39% | 23% | 33%
functions/source/fgt-asg-handler0% | 0% | 49% | 0% | 50%
functions/source/faz-handler0% | 0% | 0% | 6% | 93%
functions/source/nic-attachment0% | 0% | 0% | 0% | 100%
functions/source/fgt-asg-handler/lib/aws_cfn_response0% | 0% | 0% | 0% | 100%
functions/source/nic-attachment/lib/aws_cfn_response0% | 0% | 0% | 0% | 100%
functions/source/faz-handler/lib/aws_cfn_response0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
async handleSyncedCallback()
in functions/source/fgt-asg-handler/lib/core/autoscale-handler.js
246 76 0
async handleSyncedCallback()
in functions/source/nic-attachment/lib/core/autoscale-handler.js
246 76 0
async handleSyncedCallback()
in functions/source/faz-handler/lib/core/autoscale-handler.js
246 76 0
async saveSettings()
in functions/source/fgt-asg-handler/lib/core/autoscale-handler.js
351 64 1
async saveSettings()
in functions/source/nic-attachment/lib/core/autoscale-handler.js
351 64 1
async saveSettings()
in functions/source/faz-handler/lib/core/autoscale-handler.js
351 64 1
async handleGetConfig()
in functions/source/fgt-asg-handler/lib/aws/index.js
114 27 0
async handleGetConfig()
in functions/source/nic-attachment/lib/aws/index.js
114 27 0
async handleGetConfig()
in functions/source/faz-handler/lib/aws/index.js
114 27 0
async describeInstance()
in functions/source/fgt-asg-handler/lib/aws/index.js
80 25 1
async findRecyclableLicense()
in functions/source/fgt-asg-handler/lib/aws/index.js
83 25 3
async getBaseConfig()
in functions/source/fgt-asg-handler/lib/core/autoscale-handler.js
86 25 0
async describeInstance()
in functions/source/nic-attachment/lib/aws/index.js
80 25 1
async findRecyclableLicense()
in functions/source/nic-attachment/lib/aws/index.js
83 25 3
async getBaseConfig()
in functions/source/nic-attachment/lib/core/autoscale-handler.js
86 25 0
async describeInstance()
in functions/source/faz-handler/lib/aws/index.js
80 25 1
async findRecyclableLicense()
in functions/source/faz-handler/lib/aws/index.js
83 25 3
async getBaseConfig()
in functions/source/faz-handler/lib/core/autoscale-handler.js
86 25 0
async checkAutoScalingGroupState()
in functions/source/fgt-asg-handler/lib/aws/index.js
60 24 1
async checkAutoScalingGroupState()
in functions/source/nic-attachment/lib/aws/index.js
60 24 1