Unit Size Overall
  • There are 928 units with 16,969 lines of code in units (59.0% of code).
    • 10 very long units (2,125 lines of code)
    • 41 long units (2,756 lines of code)
    • 199 medium size units (6,335 lines of code)
    • 229 small units (3,347 lines of code)
    • 449 very small units (2,406 lines of code)
12% | 16% | 37% | 19% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py11% | 15% | 37% | 20% | 14%
ts17% | 16% | 34% | 17% | 13%
tsx0% | 21% | 61% | 12% | 3%
js0% | 0% | 61% | 16% | 21%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
plugins12% | 16% | 37% | 19% | 13%
.github44% | 0% | 20% | 12% | 22%
external_plugins0% | 14% | 31% | 27% | 25%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
468 136 2
359 108 3
299 68 1
218 25 1
202 52 1
138 30 0
124 43 2
110 39 0
104 56 1
103 39 1
99 87 1
96 10 0
86 22 1
86 58 3
85 29 1
82 58 3
80 26 5
80 23 1
80 46 3
79 54 2
75 31 1
74 1 3
73 93 2
71 26 1
70 18 7
69 14 0
67 18 1
66 16 2
66 16 3
65 11 0
65 16 4
62 18 2
61 1 2
61 13 5
60 1 6
60 29 1
60 22 7
59 10 1
59 1 5
58 26 4
57 1 2
56 30 1
56 1 2
56 6 4
55 38 1
55 13 4
54 5 2
54 30 2
54 15 2
53 5 2
About This Analysis
  • 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...
  • To learn more about unit size, the Sokrates recommends the following resources:
    • Function Length, MartinFowler.com
      • "If you have to spend effort into looking at a fragment of code to figure out what it's doing, then you should extract it into a function and name the function after that 'what'."
    • Stack Overflow Discussion on Unit Size, stackoverflow.com
      • "Use common sense, stick to small function sizes in most instances but don't be dogmatic about it if you have a genuinely good reason to make an unusually big function."
    • Coding Smells, codinghorror.com
      • "All other things being equal, a shorter method is easier to read, easier to understand, and easier to troubleshoot. Refactor long methods into smaller methods if you can."
    • Clean Code: A Handbook of Agile Software Craftsmanship, by Robert Martin
      • "The first rule of functions is that they should be small. The second rule of functions is that they should be smaller than that. Functions should not be 100 lines long. Functions should hardly ever be 20 lines long."