microsoft / m365-sample-twitter-connector-csharp-aspnet
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 159 units with 1,592 lines of code in units (46.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 16 medium size units (510 lines of code)
    • 33 small units (464 lines of code)
    • 110 very small units (618 lines of code)
0% | 0% | 32% | 29% | 38%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs0% | 0% | 31% | 29% | 39%
js0% | 0% | 46% | 26% | 26%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Twitter/SDK0% | 0% | 47% | 22% | 30%
Twitter/WebJob0% | 0% | 56% | 25% | 17%
Twitter/Connector/Controllers0% | 0% | 33% | 32% | 34%
Twitter/ConnectorTest0% | 0% | 38% | 30% | 31%
Common/ConnectorSDK0% | 0% | 50% | 0% | 49%
Twitter/Connector/ClientJs0% | 0% | 46% | 26% | 26%
Twitter/Connector/Auth0% | 0% | 62% | 21% | 16%
Twitter/Connector/App_Start0% | 0% | 43% | 35% | 21%
Common/ConnectorCommon0% | 0% | 11% | 19% | 68%
Twitter/SDK/Auth0% | 0% | 0% | 74% | 25%
Twitter/Connector/ErrorHandler0% | 0% | 0% | 87% | 12%
Common/ConnectorCommon/Workload0% | 0% | 0% | 39% | 60%
Twitter/Connector/Extensions0% | 0% | 0% | 55% | 45%
Twitter/Connector0% | 0% | 0% | 39% | 60%
Common/ConnectorCommon/SourceProvider0% | 0% | 0% | 0% | 100%
Common/ConnectorCommon/Tables0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
openPopup()
in Twitter/Connector/ClientJs/NativeConnectorSetupController.js
40 6 3
private async Task SavePageJobEntity()
in Twitter/SDK/TwitterProvider.cs
40 6 2
private async Task EnrichTweetWithAttachments()
in Twitter/SDK/JobProcessorTwitter.cs
36 10 1
public async Task Execute()
in Twitter/WebJob/DataIngestion.cs
36 4 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 Item MapTweetToItem()
in Twitter/SDK/TwitterSchemaToItemMapper.cs
35 6 1
private List MapAttachments()
in Twitter/SDK/TwitterSchemaToItemMapper.cs
35 6 1
public IHttpHandler GetHttpHandler()
in Twitter/Connector/App_Start/DefaultRouteHandler.cs
34 6 1
30 6 0
public async Task OnWebhookEvent()
in Common/ConnectorSDK/EventApiClient.cs
29 1 5
public async Task FetchData_WhenSinceIdisZero_ThenDataFetched()
in Twitter/ConnectorTest/JobProcessorTwitterTest.cs
28 1 0
public async Task FetchData_WhenSinceIdisMax_ThenNoDataFetched()
in Twitter/ConnectorTest/JobProcessorTwitterTest.cs
26 1 0
private static async Task GetResultFromResponse()
in Common/ConnectorCommon/RestApiRepository.cs
24 3 1
public async Task OnDownloadCompleteAsync()
in Common/ConnectorSDK/EventApiClient.cs
24 1 5
public async Task ScheduleTask()
in Twitter/Connector/Controllers/DataIngestionController.cs
23 2 1
public async Task DeleteJob()
in Twitter/Connector/Controllers/ConnectorJobController.cs
20 3 1
public async Task SavePage()
in Twitter/Connector/Controllers/DataSourceSetupController.cs
20 2 3
private async Task GetOAuthToken()
in Twitter/SDK/TwitterProvider.cs
20 4 0
private string UrlEncode()
in Twitter/SDK/Auth/OAuth1Helper.cs
19 4 1