microsoft / m365-sample-twitter-connector-csharp-aspnet
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 159 units with 1,592 lines of code in units (46.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 10 simple units (332 lines of code)
    • 149 very simple units (1,260 lines of code)
0% | 0% | 0% | 20% | 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
cs0% | 0% | 0% | 19% | 80%
js0% | 0% | 0% | 46% | 53%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Twitter/SDK0% | 0% | 0% | 47% | 52%
Twitter/Connector/Auth0% | 0% | 0% | 83% | 16%
Twitter/Connector/ClientJs0% | 0% | 0% | 46% | 53%
Twitter/Connector/Controllers0% | 0% | 0% | 20% | 79%
Twitter/Connector/App_Start0% | 0% | 0% | 43% | 56%
Twitter/WebJob0% | 0% | 0% | 25% | 74%
Common/ConnectorCommon0% | 0% | 0% | 0% | 100%
Twitter/ConnectorTest0% | 0% | 0% | 0% | 100%
Twitter/SDK/Auth0% | 0% | 0% | 0% | 100%
Common/ConnectorSDK0% | 0% | 0% | 0% | 100%
Common/ConnectorCommon/Workload0% | 0% | 0% | 0% | 100%
Twitter/Connector/Extensions0% | 0% | 0% | 0% | 100%
Twitter/Connector/ErrorHandler0% | 0% | 0% | 0% | 100%
Common/ConnectorCommon/SourceProvider0% | 0% | 0% | 0% | 100%
Common/ConnectorCommon/Tables0% | 0% | 0% | 0% | 100%
Twitter/Connector0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private async Task EnrichTweetWithAttachments()
in Twitter/SDK/JobProcessorTwitter.cs
36 10 1
public static async Task AuthenticateRequestAsync()
in Twitter/Connector/Auth/AuthenticateRequest.cs
35 9 1
public async Task Configure()
in Twitter/Connector/Controllers/ConfigurationController.cs
35 7 1
public IHttpHandler GetHttpHandler()
in Twitter/Connector/App_Start/DefaultRouteHandler.cs
34 6 1
private static bool CheckIfCallerClaimIsAuthorized()
in Twitter/Connector/Auth/AuthenticateRequest.cs
12 6 1
openPopup()
in Twitter/Connector/ClientJs/NativeConnectorSetupController.js
40 6 3
private async Task SavePageJobEntity()
in Twitter/SDK/TwitterProvider.cs
40 6 2
public Item MapTweetToItem()
in Twitter/SDK/TwitterSchemaToItemMapper.cs
35 6 1
private List MapAttachments()
in Twitter/SDK/TwitterSchemaToItemMapper.cs
35 6 1
30 6 0
public override void OnException()
in Twitter/Connector/ErrorHandler/AiHandleErrorAttribute.cs
12 5 1
public string GetQueryString()
in Twitter/SDK/Auth/OAuth1Helper.cs
17 5 1
public Uri CreateRequestUri()
in Common/ConnectorCommon/RestApiRepository.cs
12 4 2
request: function()
in Twitter/Connector/ClientJs/AuthInterceptor.js
9 4 1
private void AppendAdditionalParams()
in Twitter/SDK/Auth/OAuth1Helper.cs
10 4 1
private string UrlEncode()
in Twitter/SDK/Auth/OAuth1Helper.cs
19 4 1
private async Task GetOAuthToken()
in Twitter/SDK/TwitterProvider.cs
20 4 0
public async Task Execute()
in Twitter/WebJob/DataIngestion.cs
36 4 1
private async Task GetRequestAsync()
in Common/ConnectorCommon/RestApiRepository.cs
14 3 4
private async Task PostRequestAsync()
in Common/ConnectorCommon/RestApiRepository.cs
13 3 4