microsoft / devops-project-samples
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 2,413 units with 27,022 lines of code in units (28.6% of code).
    • 0 very complex units (0 lines of code)
    • 27 complex units (1,485 lines of code)
    • 84 medium complex units (2,602 lines of code)
    • 110 simple units (3,540 lines of code)
    • 2,192 very simple units (19,395 lines of code)
0% | 5% | 9% | 13% | 71%
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% | 13% | 17% | 61%
py0% | 0% | 0% | 5% | 94%
cs0% | 0% | 0% | 0% | 100%
java0% | 0% | 0% | 0% | 100%
php0% | 0% | 0% | 0% | 100%
go0% | 0% | 0% | 0% | 100%
rb0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
python0% | 11% | 16% | 14% | 58%
github0% | 6% | 9% | 8% | 75%
dotnet0% | 3% | 9% | 21% | 66%
node0% | 0% | 0% | 0% | 100%
php0% | 0% | 0% | 0% | 100%
java0% | 0% | 0% | 0% | 100%
go0% | 0% | 0% | 0% | 100%
ruby0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
applyMedia = function()
in dotnet/aspnet/mssqldb/Application/SampleWebApplication/Scripts/respond.js
55 27 1
applyMedia = function()
in dotnet/aspnet/mssqldbWithTests/Application/SampleWebApplication/Scripts/respond.js
55 27 1
applyMedia = function()
in dotnet/aspnet/webapp/Application/SampleWebApplication/Scripts/respond.js
55 27 1
applyMedia = function()
in dotnet/aspnet/webappWithTests/Application/SampleWebApplication/Scripts/respond.js
55 27 1
applyMedia = function()
in dotnet/aspnet46/vm-mssqldb/Application/SampleWebApplication/Scripts/respond.js
55 27 1
applyMedia = function()
in dotnet/aspnet46/vm-webapp/Application/SampleWebApplication/Scripts/respond.js
55 27 1
applyMedia = function()
in github/dotnet/aspnet/webappWithTests/Application/SampleWebApplication/Scripts/respond.js
55 27 1
applyMedia = function()
in github/python/bottle/containerWithTests/Application/static/scripts/respond.js
55 27 1
applyMedia = function()
in github/python/bottle/linuxWebappWithTests/Application/static/scripts/respond.js
55 27 1
applyMedia = function()
in github/python/django/containerWithTests/Application/app/static/app/scripts/respond.js
55 27 1
applyMedia = function()
in github/python/django/linuxWebappWithTests/Application/app/static/app/scripts/respond.js
55 27 1
applyMedia = function()
in github/python/flask/containerWithTests/Application/python_webapp_flask/static/scripts/respond.js
55 27 1
applyMedia = function()
in github/python/flask/linuxWebappWithTests/Application/python_webapp_flask/static/scripts/respond.js
55 27 1
applyMedia = function()
in python/bottle/container/Application/static/scripts/respond.js
55 27 1
applyMedia = function()
in python/bottle/containerWithTests/Application/static/scripts/respond.js
55 27 1
applyMedia = function()
in python/bottle/webapp/Application/static/scripts/respond.js
55 27 1
applyMedia = function()
in python/bottle/webappWithTests/Application/static/scripts/respond.js
55 27 1
applyMedia = function()
in python/django/container/Application/app/static/app/scripts/respond.js
55 27 1
applyMedia = function()
in python/django/containerWithTests/Application/app/static/app/scripts/respond.js
55 27 1
applyMedia = function()
in python/django/webapp/Application/app/static/app/scripts/respond.js
55 27 1