flutter / website
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 63 units with 680 lines of code in units (12.5% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 8 medium size units (229 lines of code)
    • 19 small units (253 lines of code)
    • 36 very small units (198 lines of code)
0% | 0% | 33% | 37% | 29%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 0% | 38% | 32% | 29%
dart0% | 0% | 57% | 33% | 8%
rb0% | 0% | 0% | 47% | 52%
py0% | 0% | 0% | 100% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/assets0% | 0% | 38% | 32% | 29%
tool0% | 0% | 51% | 41% | 7%
src/_plugins0% | 0% | 0% | 47% | 52%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
int _processFile()
in tool/extract.dart
45 12 1
function updateTable()
in src/assets/js/archive.js
37 6 2
function setupToolsTabs()
in src/assets/js/tabs.js
29 12 4
function sendRequest()
in src/assets/js/subscribe_prefs.js
26 4 1
void _extractSnippet()
in tool/extract.dart
25 6 5
function updateDownloadLink()
in src/assets/js/archive.js
25 3 2
function initVideoModal()
in src/assets/js/main.js
21 4 0
21 2 0
function adjustFixedColumns()
in src/assets/js/main.js
17 2 0
void main()
in tool/extract.dart
16 4 1
def find_invalid_link_references()
in tool/check_link_references.py
16 3 1
$()
in src/assets/js/main.js
15 1 1
render
in src/_plugins/code_tabs.rb
15 2 1
function updateList()
in src/assets/js/go_link_index.js
14 4 1
function showErrors()
in src/assets/js/subscribe_prefs.js
14 4 1
function setupTabs()
in src/assets/js/tabs.js
14 6 3
function clickHandler()
in src/assets/js/tabs.js
14 5 1
String _createDirAndFileName()
in tool/extract.dart
13 1 2
$()
in src/assets/js/archive.js
13 5 1
Iterable maxUnindent()
in tool/extract.dart
12 5 1