microsoft / WebTemplateStudio
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 428 units with 4,263 lines of code in units (19.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (45 lines of code)
    • 7 simple units (171 lines of code)
    • 419 very simple units (4,047 lines of code)
0% | 0% | 1% | 4% | 94%
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
ts0% | 0% | <1% | 4% | 94%
tsx0% | 0% | 13% | 0% | 86%
java0% | 0% | 0% | 23% | 76%
js0% | 0% | 0% | 0% | 100%
cs0% | 0% | 0% | 0% | 100%
py0% | 0% | 0% | 0% | 100%
m0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/extension/src0% | 0% | <1% | 3% | 95%
src/client/src0% | 0% | 4% | 11% | 83%
templates/RN/Projects0% | 0% | 0% | 12% | 87%
templates/Web/_composition0% | 0% | 0% | 0% | 100%
src/client/scripts0% | 0% | 0% | 0% | 100%
templates/Web/Pages0% | 0% | 0% | 0% | 100%
templates/RN/_composition0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export function parseError()
in src/extension/src/telemetry/parseError.ts
31 12 1
function getGenerationEvents()
in src/client/src/modals/GenerationModal/GenerationItem/index.tsx
14 11 1
function handleError()
in src/extension/src/telemetry/callWithTelemetryAndErrorHandling.ts
41 9 4
export function getPackageInfo()
in src/extension/src/utils/packageInfo.ts
42 9 1
function registerValidSW()
in src/client/src/serviceWorker.ts
33 8 2
function unpackErrorFromField()
in src/extension/src/telemetry/parseError.ts
15 7 2
private async validateUniqueCosmosDBAccountName()
in src/extension/src/azure/azure-cosmosDB/cosmosDbModule.ts
17 6 1
function getCode()
in src/extension/src/telemetry/parseError.ts
4 6 2
private static void initializeFlipper()
in templates/RN/Projects/Default/android/app/src/main/java/com/Param_ProjectToLower/MainApplication.java
19 6 2
export function register()
in src/client/src/serviceWorker.ts
22 5 1
public async checkWebAppName()
in src/extension/src/azure/azure-app-service/appServiceProvider.ts
28 5 2
private static async loadSubscriptionItems()
in src/extension/src/azure/azure-auth/azureAuth.ts
20 5 0
public static async deployAppService()
in src/extension/src/azure/azureServices.ts
40 5 4
private getDefaultProjectPath()
in src/extension/src/client-modules/defaults.ts
8 5 0
public static async GetInstance()
in src/extension/src/coreTemplateStudio.ts
26 5 1
async function executeTestScript()
in src/extension/src/scripts/run-tests.ts
25 5 2
public async getLatestVersion()
in src/extension/src/utils/packageVersions/packageSources/githubPackageSource.ts
18 5 1
public async isInstalled()
in src/extension/src/utils/requirements/validators/pythonValidator.ts
14 5 1
def copy_backend_to_publish()
in templates/Web/_composition/Flask/Project.Flask/backend/scripts/publish.py
8 5 2
def clean_publish()
in templates/Web/_composition/Flask/Project.Flask/backend/scripts/publish.py
7 5 0