microsoft / AdaptiveCards
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 9,589 units with 97,679 lines of code in units (53.2% of code).
    • 0 very complex units (0 lines of code)
    • 11 complex units (1,175 lines of code)
    • 124 medium complex units (8,393 lines of code)
    • 504 simple units (16,519 lines of code)
    • 8,950 very simple units (71,592 lines of code)
0% | 1% | 8% | 16% | 73%
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% | 2% | 14% | 20% | 62%
cpp0% | <1% | 6% | 17% | 75%
cs0% | 2% | 14% | 20% | 62%
java0% | <1% | 6% | 11% | 81%
js0% | 3% | 9% | 22% | 64%
mm0% | 0% | 26% | 40% | 32%
h0% | 0% | 0% | 1% | 98%
kt0% | 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
source/nodejs/adaptivecards0% | 3% | 17% | 25% | 53%
source/uwp/Renderer0% | 2% | 15% | 33% | 48%
source/nodejs/ac-typed-schema0% | 14% | 15% | 21% | 49%
source/dotnet/Library0% | 1% | 15% | 20% | 62%
source/shared/cpp0% | 1% | 13% | 16% | 68%
source/android/adaptivecards0% | <1% | 2% | 12% | 84%
source/uwp/UWPTestLibrary0% | 13% | 17% | 25% | 43%
source/nodejs/marked-schema0% | 14% | 32% | 21% | 31%
source/community/reactnative0% | 1% | 6% | 23% | 68%
source/nodejs/adaptivecards-designer0% | 0% | 10% | 13% | 75%
source/ios/AdaptiveCards0% | 0% | 19% | 30% | 50%
source/android/mobile0% | 0% | 10% | 12% | 76%
source/uwp/Visualizer0% | 0% | 14% | 13% | 72%
source/nodejs/adaptivecards-templating0% | 0% | 33% | 15% | 51%
source/uwp/AdaptiveCardsObjectModel0% | 0% | 5% | 4% | 90%
source/nodejs/adaptivecards-controls0% | 0% | 7% | 16% | 75%
source/android/mobilechatapp0% | 0% | 8% | 24% | 66%
source/uwp/UWPUITests0% | 0% | 13% | 12% | 73%
source/uwp/AdaptiveCardTestApp0% | 0% | 6% | 28% | 65%
source/ios/tools0% | 0% | 0% | 89% | 10%
source/nodejs/adaptivecards-aaf-testapp0% | 0% | 0% | 73% | 26%
source/nodejs/adaptivecards-site0% | 0% | 0% | 15% | 84%
source/nodejs/spec-generator0% | 0% | 0% | 29% | 70%
source/nodejs/adaptivecards-ui-testapp0% | 0% | 0% | 30% | 69%
source/uwp/ObjectModelTest0% | 0% | 0% | 100% | 0%
source/uwp/PerfApp0% | 0% | 0% | 15% | 84%
source/nodejs/adaptivecards-designer-app0% | 0% | 0% | 0% | 100%
source/uwp/UWPUITestApp0% | 0% | 0% | 0% | 100%
source/android/uitestapp0% | 0% | 0% | 0% | 100%
source/nodejs/adaptivecards-extras0% | 0% | 0% | 0% | 100%
source/uwp/UWPObjectModelTest0% | 0% | 0% | 0% | 100%
source/nodejs/adaptivecards-extras-designer0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
protected internalRender()
in source/nodejs/adaptivecards/src/card-elements.ts
148 37 0
bool Value::isConvertibleTo()
in source/shared/cpp/ObjectModel/jsoncpp.cpp
32 36 1
constructor()
in source/nodejs/adaptivecards/src/host-config.ts
57 35 1
function createPropertyDetails()
in source/nodejs/marked-schema/lib/generateMarkdown.js
77 34 4
bool OurReader::readToken()
in source/shared/cpp/ObjectModel/jsoncpp.cpp
99 33 1
winrt::UIElement XamlBuilder::BuildImage()
in source/uwp/Renderer/lib/AdaptiveImageRenderer.cpp
176 32 3
constructor()
in source/community/reactnative/src/utils/host-config.js
46 29 1
private transformType()
in source/nodejs/ac-typed-schema/src/typed-schema.ts
167 28 1
public virtual string Output()
in source/dotnet/Library/AdaptiveCards/MarkedNet/MarkedNet/InlineLexer.cs
147 27 1
public async Task SaveAsNewExpectedAsync()
in source/uwp/UWPTestLibrary/TestResultViewModel.cs
97 27 3
public void renderElementAndPerformFallback()
in source/android/adaptivecards/src/main/java/io/adaptivecards/renderer/registration/CardRendererRegistration.java
129 26 9
static getElement()
in source/community/reactnative/src/models/model-factory.js
58 25 3
public FrameworkElement Render()
in source/dotnet/Library/AdaptiveCards.Rendering.Wpf/AdaptiveRenderContext.cs
75 25 1
protected virtual string Tok()
in source/dotnet/Library/AdaptiveCards/MarkedNet/MarkedNet/Parser.cs
105 25 0
bool Reader::readToken()
in source/shared/cpp/ObjectModel/jsoncpp.cpp
70 25 1
bool OurReader::readObject()
in source/shared/cpp/ObjectModel/jsoncpp.cpp
59 25 1
protected EditText renderInternal()
in source/android/adaptivecards/src/main/java/io/adaptivecards/renderer/input/TextInputRenderer.java
142 24 11
private async internalSendActivityRequestAsync()
in source/nodejs/adaptivecards/src/adaptive-applet.ts
158 24 1
public View renderActions()
in source/android/adaptivecards/src/main/java/io/adaptivecards/renderer/ActionLayoutRenderer.java
135 23 8
public override AdaptiveCardsTemplateResult VisitObj()
in source/dotnet/Library/AdaptiveCards.Templating/AdaptiveCardsTemplateVisitor.cs
100 23 1