microsoft / mattercenter
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 2,201 units with 48,197 lines of code in units (52.4% of code).
    • 38 very long units (6,117 lines of code)
    • 168 long units (11,670 lines of code)
    • 554 medium size units (17,557 lines of code)
    • 477 small units (7,141 lines of code)
    • 964 very small units (5,712 lines of code)
12% | 24% | 36% | 14% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js15% | 19% | 28% | 17% | 18%
cs10% | 27% | 41% | 12% | 6%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
tree/master/cloud/src/solution/Microsoft.Legal.MatterCenter.Web17% | 20% | 33% | 14% | 13%
tree/master/cloud/src/solution/Microsoft.Legal.MatterCenter.Service15% | 28% | 35% | 14% | 5%
tree/master/cloud/src/Helper Utilities/Microsoft.Legal.MatterCenter.HelperUtilities3% | 37% | 47% | 8% | 3%
tree/master/cloud/src/solution/Microsoft.Legal.MatterCenter.jobs0% | 42% | 37% | 14% | 5%
tree/master/cloud/src/solution/Microsoft.Legal.MatterCenter.Selenium0% | 8% | 35% | 25% | 30%
tree/master/cloud/src/deployments/Static Content0% | 8% | 35% | 24% | 31%
tree/master/cloud/src/solution/Microsoft.Legal.MatterCenter.Jasmine0% | 49% | 16% | 19% | 14%
tree/master/cloud/src/solution/Matter.legal.MatterCenter.Performance0% | 0% | 44% | 35% | 20%
tree/master/cloud/src/solution/AuthWebTestPlugin0% | 0% | 18% | 50% | 31%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
cm.UpdateMatterUser = function()
in tree/master/cloud/src/solution/Microsoft.Legal.MatterCenter.Web/wwwroot/app/matter/matterusers.controller.js
346 20 2
public bool UpdateMatterStampedProperties()
in tree/master/cloud/src/solution/Microsoft.Legal.MatterCenter.Service/Microsoft.Legal.MatterCenter.Repository/Matter/MatterRepository.cs
311 63 6
internal Dictionary SetStampProperty()
in tree/master/cloud/src/solution/Microsoft.Legal.MatterCenter.Web/Common/MatterProvision.cs
300 47 1
function()
in tree/master/cloud/src/solution/Microsoft.Legal.MatterCenter.Web/wwwroot/app/matter/createMatter.controller.js
287 18 10
function matterDashBoardController()
in tree/master/cloud/src/solution/Microsoft.Legal.MatterCenter.Web/wwwroot/app/dashboard/matterdashboard.controller.js
266 15 17
$scope.sortChanged = function()
in tree/master/cloud/src/solution/Microsoft.Legal.MatterCenter.Web/wwwroot/app/matter/matters.controller.js
254 37 2
function getDefaultContentTypeValues()
in tree/master/cloud/src/solution/Microsoft.Legal.MatterCenter.Web/wwwroot/app/matter/createMatter.controller.js
200 78 1
private void CreateConfig()
in tree/master/cloud/src/solution/Microsoft.Legal.MatterCenter.Web/Startup.cs
196 28 1
cm.removeAssignPermissionsRow = function()
in tree/master/cloud/src/solution/Microsoft.Legal.MatterCenter.Web/wwwroot/app/matter/matterusers.controller.js
193 5 1
public async Task GetDocumentsAsync()
in tree/master/cloud/src/solution/Microsoft.Legal.MatterCenter.Web/Common/DocumentProvision.cs
191 34 2
function validateCurrentPage()
in tree/master/cloud/src/solution/Microsoft.Legal.MatterCenter.Web/wwwroot/app/matter/createMatter.controller.js
189 49 1
public string GetMatterProvisionExtraProperties()
in tree/master/cloud/src/solution/Microsoft.Legal.MatterCenter.Service/Microsoft.Legal.MatterCenter.Repository/Matter/MatterRepository.cs
172 34 2
public SearchResponseVM GetPinnedData()
in tree/master/cloud/src/solution/Microsoft.Legal.MatterCenter.Service/Microsoft.Legal.MatterCenter.Repository/SharePointInfo/Search.cs
171 37 5
public async Task GetMatters()
in tree/master/cloud/src/solution/Microsoft.Legal.MatterCenter.Web/Common/MatterProvision.cs
159 37 2
$scope.sortChangedDocument = function()
in tree/master/cloud/src/solution/Microsoft.Legal.MatterCenter.Web/wwwroot/app/document/documents.controller.js
157 43 2
getDefaultMatterConfigurations()
in tree/master/cloud/src/solution/Microsoft.Legal.MatterCenter.Web/wwwroot/app/matter/createMatter.controller.js
154 35 2
function validateUsers()
in tree/master/cloud/src/solution/Microsoft.Legal.MatterCenter.Web/wwwroot/app/matter/createMatter.controller.js
144 34 0
cm.UpdateMatter = function()
in tree/master/cloud/src/solution/Microsoft.Legal.MatterCenter.Web/wwwroot/app/matter/matterusers.controller.js
143 19 1
function stampProperties()
in tree/master/cloud/src/solution/Microsoft.Legal.MatterCenter.Web/wwwroot/app/matter/createMatter.controller.js
135 29 0
public IActionResult UploadFiles()
in tree/master/cloud/src/solution/Microsoft.Legal.MatterCenter.Web/Controllers/DocumentController.cs
131 19 0