smtp-server

105 releases measured. Default branch at ddef9ccd, 2026-10-19, 6 files.

Source lines
3,259
+46.0% in a year
Maintainability index
46.7
-0.8 in a year
Mean CC per function
4.15
Functions with CC > 20
6
of 208
Size

Lines of code, comments and blank lines left out

Maintainability index

Mean over functions, weighted by their lines. Higher is better

Cyclomatic complexity per function

Lower is better

Hard to maintain

Share of functions, and of function code, past the usual limits. Lower is better

Least maintainable functions now

Function Location MI CC Lines
_parseAddressCommand src/smtp-connection.ts:1390 23.0 43 117
_onCommand src/smtp-connection.ts:1101 24.1 38 115
handler_XCLIENT src/smtp-connection.ts:1851 27.4 27 101
handler_XFORWARD src/smtp-connection.ts:2024 27.6 24 103
_feedDataStream src/smtp-stream.ts:258 33.0 21 66
_validateMailParams src/smtp-connection.ts:2203 34.5 19 67
socketReader src/smtp-server.ts:657 35.2 15 60
handler_RCPT src/smtp-connection.ts:2367 36.2 21 50
constructor src/smtp-connection.ts:500 38.1 15 44
handler_EHLO src/smtp-connection.ts:1697 38.5 19 40
<anonymous> src/sasl.ts:489 38.9 4 60
close src/smtp-connection.ts:2479 39.5 16 41
<anonymous> src/sasl.ts:327 39.5 7 51
<anonymous> src/sasl.ts:129 40.2 7 50
<anonymous> src/sasl.ts:228 40.2 7 50
Every measured release 105
Release Date Files Source lines Functions MI Mean CC P90 CC Max CC CC > 10 CC > 20
default branch 2026-10-19 6 3,259 208 46.7 4.15 8 43 17 6
v3.20.2 2026-10-18 6 3,259 208 46.7 4.15 8 43 17 6
v3.20.1 2026-10-18 6 3,259 208 46.7 4.15 8 43 17 6
v3.20.0 2026-10-18 6 3,259 208 46.7 4.15 8 43 17 6
v3.19.24 2026-10-18 5 2,917 202 47.1 4.18 8 43 18 4
v3.19.23 2026-10-16 5 2,917 202 47.1 4.18 8 43 18 4
v3.19.22 2026-10-14 5 2,800 192 46.9 4.23 8 43 17 5
v3.19.21 2026-10-10 5 2,800 192 46.9 4.23 8 43 17 5
v3.19.20 2026-10-10 5 2,754 188 47.0 4.24 10 40 17 6
v3.19.19 2026-10-10 5 2,754 188 47.0 4.24 10 40 17 6
v3.19.18 2026-10-08 5 2,751 188 47.1 4.23 10 40 17 5
v3.19.17 2026-10-03 5 2,751 188 47.1 4.23 10 40 17 5
v3.19.16 2026-09-30 5 2,751 188 47.1 4.23 10 40 17 5
v3.19.15 2026-09-28 5 2,751 188 47.1 4.23 10 40 17 5
v3.19.14 2026-09-27 5 2,641 176 46.9 4.36 10 40 16 5
v3.19.13 2026-09-15 5 2,641 176 46.9 4.36 10 40 16 5
v3.19.12 2026-09-12 5 2,641 176 46.9 4.36 10 40 16 5
v3.19.11 2026-09-11 5 2,641 176 46.9 4.36 10 40 16 5
v3.19.10 2026-09-10 5 2,641 176 46.9 4.36 10 40 16 5
v3.19.9 2026-09-07 5 2,641 176 46.9 4.36 10 40 16 5
v3.19.8 2026-09-06 5 2,641 176 46.9 4.36 10 40 16 5
v3.19.7 2026-09-02 5 2,641 176 46.9 4.36 10 40 16 5
v3.19.6 2026-09-01 5 2,637 176 46.9 4.36 10 40 16 5
v3.19.5 2026-08-31 5 2,637 176 46.9 4.36 10 40 16 5
v3.19.4 2026-08-27 5 2,637 176 46.9 4.36 10 40 16 5
v3.19.3 2026-08-07 5 2,637 176 46.9 4.36 10 40 16 5
v3.19.2 2026-07-05 5 2,537 171 46.5 4.25 8 40 15 6
v3.19.1 2026-06-19 5 2,537 171 46.5 4.25 8 40 15 6
v3.19.0 2026-06-15 5 2,537 171 46.5 4.25 8 40 15 6
v3.18.5 2026-05-29 5 2,424 163 46.6 4.29 8 36 14 6
v3.18.4 2026-04-08 5 2,424 163 46.6 4.29 8 36 14 6
v3.18.3 2026-03-25 5 2,424 163 46.6 4.29 8 36 14 6
v3.18.2 2026-03-23 5 2,414 162 46.6 4.29 8 36 14 6
v3.18.1 2026-01-28 5 2,414 162 46.6 4.29 8 36 14 6
v3.18.0 2025-12-22 5 2,416 162 46.6 4.29 8 36 14 6
v3.17.1 2025-12-12 5 2,389 162 47.0 4.23 8 36 14 6
v3.17.0 2025-12-11 5 2,332 161 47.1 4.17 8 36 14 6
v3.15.0 2025-10-09 5 2,232 157 47.5 4.05 8 36 13 4
v3.14.0 2025-06-27 5 2,201 157 47.6 3.99 7 36 12 4
v3.13.8 2025-06-04 5 2,083 155 47.8 3.88 7 36 10 4
v3.13.7 2025-05-20 5 2,075 155 47.9 3.86 7 35 10 4
v3.13.6 2024-10-21 5 2,070 155 48.0 3.86 7 35 10 4
v3.13.5 2024-09-08 5 2,070 155 48.0 3.86 7 35 10 4
v3.13.4 2024-04-12 5 2,070 155 48.0 3.86 7 35 10 4
v3.13.3 2024-02-29 5 2,070 155 48.0 3.86 7 35 10 4
v3.13.2 2024-02-02 5 2,070 155 48.0 3.86 7 35 10 4
v3.13.1 2024-02-02 5 2,070 155 48.0 3.86 7 35 10 4
v3.13.0 2023-08-15 5 2,064 155 48.1 3.85 7 34 10 4
v3.12.0 2023-05-24 5 2,035 150 47.8 3.93 7 34 10 4
v3.11.0 2022-04-28 5 2,035 150 47.8 3.92 7 34 10 4
v3.10.0 2022-02-23 5 2,035 150 47.8 3.92 7 34 10 4
v3.9.0 2021-06-01 5 2,033 150 47.8 3.90 7 34 9 4
v3.8.0 2020-11-13 5 2,000 147 47.7 3.93 7 34 9 4
v3.7.0 2020-06-25 5 2,005 149 47.8 3.90 7 34 9 4
v3.6.0 2020-03-15 5 2,073 149 47.6 3.90 7 34 9 4
v3.5.0 2019-01-04 5 2,064 149 47.6 3.89 7 34 9 4
v3.4.7 2018-08-27 5 2,047 149 47.7 3.88 7 34 9 4
v3.4.6 2018-06-16 5 1,975 144 47.1 3.81 7 36 9 4
v3.4.5 2018-05-25 5 1,975 144 47.1 3.81 7 36 9 4
v3.4.4 2018-05-04 5 1,965 144 47.2 3.77 7 36 9 4
v3.4.2 2018-03-16 5 1,925 144 47.3 3.74 7 36 9 4
v3.4.1 2017-12-01 5 1,922 144 47.3 3.73 7 36 9 4
v3.4.0 2017-12-01 5 1,922 144 47.3 3.73 7 36 9 4
v3.3.1 2017-11-28 5 1,868 139 46.9 3.71 7 39 7 4
v3.3.0 2017-10-05 5 1,851 137 46.7 3.72 7 38 7 4
v3.2.0 2017-10-01 5 1,728 128 46.3 3.84 8 38 8 4
v3.1.0 2017-08-16 5 1,728 128 46.3 3.84 8 38 8 4
v3.0.1 2017-04-07 5 1,533 125 47.8 3.88 7 38 8 4
v3.0.0 2017-04-06 5 1,533 125 47.8 3.88 7 38 8 4
v2.0.3 2017-03-14 5 1,533 125 47.8 3.88 7 38 8 4
v2.0.2 2017-02-17 5 1,533 125 47.8 3.88 7 38 8 4
v2.0.1 2017-02-04 5 1,530 125 47.8 3.86 7 38 8 4
v2.0.0 2017-02-04 5 1,530 125 47.8 3.86 7 38 8 4
v1.17.0 2016-12-12 5 1,370 106 49.6 4.21 8 36 8 4
v1.16.1 2016-10-17 5 1,370 106 49.6 4.19 8 36 8 4
v1.16.0 2016-10-17 5 1,368 105 49.6 4.22 8 36 8 4
v1.15.0 2016-09-23 5 1,367 105 49.6 4.22 8 36 8 4
v1.14.2 2016-09-02 5 1,308 103 50.5 4.12 7 34 8 3
v1.14.1 2016-08-16 5 1,308 103 50.5 4.13 7 34 8 3
v1.14.0 2016-08-09 5 1,307 103 50.5 4.10 7 34 8 3
v1.13.1 2016-08-04 5 1,304 103 50.5 4.09 7 34 8 3
v1.13.0 2016-07-29 5 1,304 103 50.5 4.10 7 34 8 3
v1.12.0 2016-07-25 5 1,301 103 50.5 4.09 7 34 8 3
v1.11.2 2016-07-15 5 1,274 102 50.7 4.05 7 31 8 3
v1.11.1 2016-07-12 5 1,274 102 50.7 4.05 7 31 8 3
v1.11.0 2016-07-07 5 1,274 102 50.7 4.05 7 31 8 3
v1.10.0 2016-07-06 5 1,243 101 51.2 3.88 7 27 7 3
v1.9.1 2016-04-26 5 1,241 100 51.1 3.84 6 27 7 3
v1.8.0 2016-01-27 5 1,237 99 51.1 3.86 6 27 7 3
v1.7.1 2015-10-27 5 1,174 101 53.0 3.50 6 25 6 2
v1.7.0 2015-10-27 5 1,173 101 53.1 3.50 6 25 6 2
v1.6.0 2015-09-29 5 1,071 96 53.7 3.38 6 25 4 2
v1.5.2 2015-09-18 5 1,059 94 53.5 3.37 6 25 4 2
v1.5.1 2015-09-18 5 1,059 92 53.7 3.46 6 25 3 2
v1.5.0 2015-08-20 5 1,078 92 53.7 3.45 6 25 3 2
v1.4.2 2015-06-30 5 1,057 92 54.3 3.38 6 21 3 2
v1.4.1 2015-06-30 5 1,057 92 54.3 3.37 6 21 3 2
v1.4.0 2015-04-30 5 1,040 91 54.3 3.35 6 21 3 2
v1.3.1 2015-04-21 5 1,029 91 54.5 3.29 6 21 3 2
v1.3.0 2015-04-21 5 1,011 90 54.6 3.22 6 21 3 2
v1.2.0 2015-03-11 5 942 86 54.6 3.21 6 21 3 2
v1.1.1 2015-03-11 5 902 81 54.6 3.26 6 21 3 1
v1.1.0 2015-03-09 5 908 81 54.4 3.30 6 21 3 1
v1.0.2 2015-02-17 5 900 78 54.5 3.35 6 21 3 1
v1.0.1 2015-02-16 5 894 78 54.7 3.31 6 19 3 0
v1.0.0 2015-02-16 5 899 78 54.6 3.31 6 19 3 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.