microsoft / vsts-extension-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 350 units with 3,213 lines of code in units (44.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (98 lines of code)
    • 13 simple units (368 lines of code)
    • 335 very simple units (2,747 lines of code)
0% | 0% | 3% | 11% | 85%
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% | 4% | 10% | 84%
js0% | 0% | 0% | 20% | 79%
tsx0% | 0% | 0% | 4% | 95%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
backlogs-panel0% | 0% | 29% | 36% | 33%
analytics-example-widget0% | 0% | 1% | 1% | 96%
ui0% | 0% | 0% | 32% | 67%
widgets0% | 0% | 0% | 31% | 68%
data-storage0% | 0% | 0% | 10% | 89%
build-inspector0% | 0% | 0% | 12% | 87%
ui-fabric-react0% | 0% | 0% | 16% | 83%
dashboard-manager0% | 0% | 0% | 0% | 100%
build-results-enhancer0% | 0% | 0% | 0% | 100%
contributions-guide0% | 0% | 0% | 0% | 100%
release-management0% | 0% | 0% | 0% | 100%
custom-content-renderer0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private static _computePullRequestState()
in backlogs-panel/src/workdetailsdata.ts
77 17 1
export function areSettingsValid()
in analytics-example-widget/scripts/common/WidgetSettings.ts
21 16 1
public static beginGetWorkDetails()
in backlogs-panel/src/workdetailsdata.ts
68 9 3
public updateNote()
in data-storage/src/dataStorage/notesServices.ts
35 9 3
var getQueryInfo = function()
in widgets/templates/scripts/Widget-for-sample-configuration.js
32 9 1
public parseHash()
in build-inspector/src/inspector/associatedItemsView.ts
15 8 1
private _updateView()
in build-inspector/src/inspector/associatedItemsView.ts
22 7 0
public setSource()
in data-storage/src/dataStorage/notesGrids.ts
21 7 1
private buildWiql()
in ui-fabric-react/scripts/WorkItemSearch.ts
31 7 1
load: function()
in widgets/templates/scripts/sample-configuration.js
27 7 2
private populateFilterRowOptions()
in analytics-example-widget/scripts/config/AnalyticsConfigActionCreator.ts
17 6 3
public setWorkItemIds()
in backlogs-panel/src/main.tsx
27 6 1
24 6 1
25 6 2
24 6 2
private ensureChartIsInstantiated()
in analytics-example-widget/scripts/components/ChartComponent.tsx
16 5 1
private getOptions()
in analytics-example-widget/scripts/components/PickerComponent.tsx
13 5 0
private createAggregationModePicker()
in analytics-example-widget/scripts/config/AnalyticsConfigComponent.tsx
19 5 0
private createAggregationSumValuePicker()
in analytics-example-widget/scripts/config/AnalyticsConfigComponent.tsx
23 5 0
private _initBuildStatus()
in build-results-enhancer/src/enhancer/status.ts
16 5 1