microsoft / TailwindTraders
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 113 units with 1,282 lines of code in units (4.5% of code).
    • 1 very long units (111 lines of code)
    • 3 long units (203 lines of code)
    • 15 medium size units (397 lines of code)
    • 13 small units (196 lines of code)
    • 81 very small units (375 lines of code)
8% | 15% | 30% | 15% | 29%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js8% | 15% | 30% | 15% | 29%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Documents/assets/smoothscroll22% | 25% | 25% | 8% | 18%
Documents/assets/theme/js0% | 9% | 34% | 19% | 36%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
(function ()()
in Documents/assets/smoothscroll/smooth-scroll.js
111 29 1
(function($)()
in Documents/assets/theme/js/script.js
76 27 1
function keydown()
in Documents/assets/smoothscroll/smooth-scroll.js
74 36 1
function wheel()
in Documents/assets/smoothscroll/smooth-scroll.js
53 29 1
var step = function()
in Documents/assets/smoothscroll/smooth-scroll.js
45 13 1
function init()
in Documents/assets/smoothscroll/smooth-scroll.js
34 10 0
function initClientCarousel()
in Documents/assets/theme/js/script.js
30 6 1
function scrollArray()
in Documents/assets/smoothscroll/smooth-scroll.js
29 7 3
function initReveal()
in Documents/assets/theme/js/script.js
27 2 0
function setNewSize()
in Documents/assets/theme/js/script.js
27 4 0
$()
in Documents/assets/theme/js/script.js
26 2 1
$()
in Documents/assets/theme/js/script.js
25 7 1
var modal = function()
in Documents/assets/theme/js/script.js
24 5 1
$()
in Documents/assets/theme/js/script.js
23 6 1
function overflowingAncestor()
in Documents/assets/smoothscroll/smooth-scroll.js
22 12 1
$()
in Documents/assets/theme/js/script.js
22 9 1
$()
in Documents/assets/theme/js/script.js
21 6 1
function checkIfInView()
in Documents/assets/theme/js/script.js
21 6 0
$()
in Documents/assets/theme/js/script.js
21 3 1
function updateClientCarousel()
in Documents/assets/theme/js/script.js
20 4 1