Code health

Size, complexity and maintainability index of EmailEngine and the libraries it is built on, measured at every release and at the current default branch.

Repositories
18
Source lines
131,980
Releases measured
1,654
Functions with CC > 20
208

Repositories, current default branch

Repository Source lines In a year Functions MI In a year Mean CC CC > 20
emailengine 80,271 +40.7% 4,549 39.6 +5.7 4.53 139
imapflow 11,312 +62.9% 659 42.9 +1.1 4.94 21
nodemailer 13,178 +30.6% 781 49.1 -0.7 4.14 17
mailparser 1,339 +17.3% 114 48.7 -0.8 3.89 3
smtp-server 3,259 +46.0% 208 46.7 -0.8 4.15 6
libmime 3,256 +3.6% 49 45.5 -1.6 5.41 1
libqp 261 +24.9% 16 51.4 +3.7 6.06 0
libbase64 239 +39.0% 14 52.6 0.0 4.57 0
ioredfour 451 +246.9% 55 56.9 -1.5 2.25 0
email-content 9,916 - 628 41.6 - 4.45 17
email-text-tools 1,217 +28.2% 74 50.8 +1.0 4.55 0
email-ai-tools 1,295 -10.8% 108 48.5 +12.4 4.41 4
bounce-classifier 735 - 51 53.7 - 3.27 0
certs 2,031 +207.3% 158 50.8 +3.7 3.72 0
templates 193 +58.2% 25 59.2 +1.2 3.16 0
gettext 2,615 +9.0% 216 67.7 -4.5 1.93 0
joi-messages 78 +9.9% 1 46.2 -1.2 10.00 0
pubface 334 +49.1% 27 54.3 -0.3 3.70 0
How the numbers are made

Library source only: lib/, src/, workers/, bin/ and top-level source files. Tests, examples, tooling, type declarations and generated or minified files are left out.

Source lines are lines carrying code, with blank lines and comments dropped.

Cyclomatic complexity (CC) counts the independent paths through a function: 1 plus every if, loop, case, catch, ternary, && / || / ??, optional chain and default parameter. Above 10 a function is commonly considered hard to test, above 20 hard to understand.

Maintainability index (MI) is computed per function as max(0, (171 - 5.2 ln(Halstead volume) - 0.23 CC - 16.2 ln(lines)) * 100 / 171), the 0 to 100 scale Visual Studio uses, where below 20 is poor. The repository figure weights each function by its lines. Code outside any function (lookup tables, schemas, declarations) counts toward size only. MI is driven mostly by size, so read it as a trend, not a grade.

A move from JavaScript to TypeScript adds type annotations to every function, which raises the Halstead volume and lowers MI without the logic changing. Expect a step at that release.

Measured Mon, 19 Oct 2026 19:28:19 GMT.