aws-samples / unishop-monolith-to-microservices
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 230 units with 1,467 lines of code in units (5.4% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (52 lines of code)
    • 2 medium complex units (68 lines of code)
    • 7 simple units (184 lines of code)
    • 220 very simple units (1,163 lines of code)
0% | 3% | 4% | 12% | 79%
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% | 10% | 18% | 63%
java0% | 0% | 0% | 7% | 92%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
MonoToMicroUI/fontawesome-free0% | 8% | 9% | 19% | 61%
MonoToMicroUI/js0% | 0% | 15% | 6% | 78%
MonoToMicroLambda/src0% | 0% | 0% | 37% | 62%
MonoToMicroLegacy/src0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
function report()
in MonoToMicroUI/fontawesome-free/js/conflict-detection.js
52 26 1
(function (global, factory)()
in MonoToMicroUI/fontawesome-free/js/conflict-detection.js
58 23 2
n.exports = function()
in MonoToMicroUI/js/uuidv1.js
10 18 3
n.exports = function()
in MonoToMicroUI/js/uuidv1.js
4 9 2
public String removeUnicornFromBasket()
in MonoToMicroLambda/src/main/java/com/monoToMicro/Lambda/UnicornBasketImpl.java
32 9 2
public String addUnicornToBasket()
in MonoToMicroLambda/src/main/java/com/monoToMicro/Lambda/UnicornBasketImpl.java
28 8 2
function md5ForNode()
in MonoToMicroUI/fontawesome-free/js/conflict-detection.js
13 7 1
function detectSvgConflicts()
in MonoToMicroUI/fontawesome-free/js/conflict-detection.js
47 7 1
WINDOW.onmessage = function()
in MonoToMicroUI/fontawesome-free/js/conflict-detection.js
11 7 1
function conflictDetection()
in MonoToMicroUI/fontawesome-free/js/conflict-detection.js
49 6 0
$()
in MonoToMicroUI/js/freelancer.js
15 5 1
_typeof = function()
in MonoToMicroUI/fontawesome-free/js/conflict-detection.js
3 5 1
function pollUntil()
in MonoToMicroUI/fontawesome-free/js/conflict-detection.js
15 5 1
public ResponseEntity addUnicornToBasket()
in MonoToMicroLegacy/src/main/java/com/monoToMicro/rest/controller/BasketController.java
12 5 1
public ResponseEntity removeFromBasket()
in MonoToMicroLegacy/src/main/java/com/monoToMicro/rest/controller/BasketController.java
12 5 1
function _objectSpread()
in MonoToMicroUI/fontawesome-free/js/conflict-detection.js
15 4 1
function md5()
in MonoToMicroUI/fontawesome-free/js/conflict-detection.js
12 4 3
setTimeout()
in MonoToMicroUI/fontawesome-free/js/conflict-detection.js
17 4 1
public synchronized User create()
in MonoToMicroLegacy/src/main/java/com/monoToMicro/core/repository/UserRepositoryImpl.java
12 4 1
function _typeof()
in MonoToMicroUI/fontawesome-free/js/conflict-detection.js
3 3 1