Repository Analysis

PHPMailer/PHPMailer

The classic email sending library for PHP

11.1 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of PHPMailer/PHPMailer, a PHP project with 22,245 GitHub stars. SynthScan v2.0 examined 22,046 lines of code across 154 source files, recording 214 pattern matches distributed across 4 syntactic categories. The overall adjusted score of 11.1 places this repository in the Low AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

11.1
Adjusted Score
11.1
Raw Score
100%
Time Factor
2026-07-07
Last Push
22.2K
Stars
PHP
Language
22.0K
Lines of Code
154
Files
214
Pattern Hits
2026-07-14
Scan Date
0.00
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 0MEDIUM 1LOW 213

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 214 distinct pattern matches across 4 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Fake / Example Data125 hits · 153 pts
SeverityFileLineSnippetContext
LOWREADME.md111 $mail->Username = 'user@example.com'; //SMTP usernameCODE
LOWtest/PHPMailer/MailTransportTest.php124 * php -d sendmail_path="/usr/sbin/sendmail -t -i -frpath@example.org" ./vendor/bin/phpunitCOMMENT
LOWtest/PHPMailer/MailTransportTest.php131 $sender = 'rpath@example.org';CODE
LOWtest/PHPMailer/MailTransportTest.php154 * php -d sendmail_path="/usr/sbin/sendmail -t -i -frpath@example.org" ./vendor/bin/phpunitCOMMENT
LOWtest/PHPMailer/MailTransportTest.php161 $sender = 'rpath@example.org';CODE
LOWtest/PHPMailer/MailTransportTest.php232 'rpath@example.org'CODE
LOWtest/PHPMailer/MailTransportTest.php237 'rpath@example.org',CODE
LOWtest/PHPMailer/MailTransportTest.php240 '/opt/sendmail -x -y -fuser@example.org',CODE
LOWtest/PHPMailer/MailTransportTest.php242 'user@example.org',CODE
LOWtest/PHPMailer/MailTransportTest.php245 '/opt/sendmail -X /path/to/logfile -fuser@example.org',CODE
LOWtest/PHPMailer/MailTransportTest.php247 'user@example.org',CODE
LOWtest/PHPMailer/WrapTextTest.php55 'message' => 'Lorem ipsum dolor sit amet.',CODE
LOWtest/PHPMailer/WrapTextTest.php55 'message' => 'Lorem ipsum dolor sit amet.',CODE
LOWtest/PHPMailer/WrapTextTest.php56 'expected' => 'Lorem ipsum dolor sit amet.' . PHPMailer::getLE(),CODE
LOWtest/PHPMailer/WrapTextTest.php56 'expected' => 'Lorem ipsum dolor sit amet.' . PHPMailer::getLE(),CODE
LOWtest/PHPMailer/WrapTextTest.php60 'message' => 'Lorem ipsum dolor sit amet.',CODE
LOWtest/PHPMailer/WrapTextTest.php60 'message' => 'Lorem ipsum dolor sit amet.',CODE
LOWtest/PHPMailer/WrapTextTest.php61 'expected' => 'Lorem ipsum dolor sit amet.' . PHPMailer::getLE(),CODE
LOWtest/PHPMailer/WrapTextTest.php61 'expected' => 'Lorem ipsum dolor sit amet.' . PHPMailer::getLE(),CODE
LOWtest/PHPMailer/WrapTextTest.php65 'message' => 'Lorem ipsum dolor' . PHPMailer::CRLF,CODE
LOWtest/PHPMailer/WrapTextTest.php66 'expected' => 'Lorem ipsum dolor' . PHPMailer::getLE(),CODE
LOWtest/PHPMailer/WrapTextTest.php69 'message' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'CODE
LOWtest/PHPMailer/WrapTextTest.php69 'message' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'CODE
LOWtest/PHPMailer/WrapTextTest.php72 'expected' => 'Lorem ipsum dolor sit amet, consectetur adipiscing' . PHPMailer::getLE()CODE
LOWtest/PHPMailer/WrapTextTest.php72 'expected' => 'Lorem ipsum dolor sit amet, consectetur adipiscing' . PHPMailer::getLE()CODE
LOWtest/PHPMailer/WrapTextTest.php80 'message' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'CODE
LOWtest/PHPMailer/WrapTextTest.php80 'message' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'CODE
LOWtest/PHPMailer/WrapTextTest.php83 'expected' => 'Lorem ipsum dolor sit amet, consectetur adipiscing =' . PHPMailer::getLE()CODE
LOWtest/PHPMailer/WrapTextTest.php83 'expected' => 'Lorem ipsum dolor sit amet, consectetur adipiscing =' . PHPMailer::getLE()CODE
LOWtest/PHPMailer/WrapTextTest.php91 'message' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. =' . PHPMailer::CRLFCODE
LOWtest/PHPMailer/WrapTextTest.php91 'message' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. =' . PHPMailer::CRLFCODE
LOWtest/PHPMailer/WrapTextTest.php95 'expected' => 'Lorem ipsum dolor sit amet, consectetur adipiscing =' . PHPMailer::getLE()CODE
LOWtest/PHPMailer/WrapTextTest.php95 'expected' => 'Lorem ipsum dolor sit amet, consectetur adipiscing =' . PHPMailer::getLE()CODE
LOWtest/PHPMailer/WrapTextTest.php104 'message' => 'Lorem ipsumdolorsitametconsetetursadipscingelitrseddiamnonumy',CODE
LOWtest/PHPMailer/WrapTextTest.php110 'message' => 'Lorem ipsumdolorsitametconsetetursadipscingelitrseddiamnonumy',CODE
LOWtest/PHPMailer/WrapTextTest.php111 'expected' => 'Lorem ipsumdolorsitametconsetetursadipscingelitrs=' . PHPMailer::getLE()CODE
LOWtest/PHPMailer/WrapTextTest.php116 'message' => 'Lorem ipsumdolorsitametconsetetursadipscingelitrseddiam=' . PHPMailer::CRLFCODE
LOWtest/PHPMailer/EmptyMailerTest.php33 $this->Mail->addAddress('whoto@example.com', 'John Doe');CODE
LOWtest/PHPMailer/ValidateAddressTest.php122 'first@example.org',CODE
LOWtest/PHPMailer/ValidateAddressTest.php123 'first.last@example.org',CODE
LOWtest/PHPMailer/ValidateAddressTest.php124 '1234567890123456789012345678901234567890123456789012345678901234@example.org',CODE
LOWtest/PHPMailer/ValidateAddressTest.php125 '"first\"last"@example.org',CODE
LOWtest/PHPMailer/ValidateAddressTest.php126 '"first@last"@example.org',CODE
LOWtest/PHPMailer/ValidateAddressTest.php127 '"first\last"@example.org',CODE
LOWtest/PHPMailer/ValidateAddressTest.php131 '"first\last"@example.org',CODE
LOWtest/PHPMailer/ValidateAddressTest.php132 '"Abc\@def"@example.org',CODE
LOWtest/PHPMailer/ValidateAddressTest.php133 '"Fred\ Bloggs"@example.org',CODE
LOWtest/PHPMailer/ValidateAddressTest.php134 '"Joe.\Blow"@example.org',CODE
LOWtest/PHPMailer/ValidateAddressTest.php135 '"Abc@def"@example.org',CODE
LOWtest/PHPMailer/ValidateAddressTest.php136 'user+mailbox@example.org',CODE
LOWtest/PHPMailer/ValidateAddressTest.php137 'customer/department=shipping@example.org',CODE
LOWtest/PHPMailer/ValidateAddressTest.php138 '$A12345@example.org',CODE
LOWtest/PHPMailer/ValidateAddressTest.php139 '!def!xyz%abc@example.org',CODE
LOWtest/PHPMailer/ValidateAddressTest.php140 '_somename@example.org',CODE
LOWtest/PHPMailer/ValidateAddressTest.php142 'peter.piper@example.org',CODE
LOWtest/PHPMailer/ValidateAddressTest.php143 'test@example.org',CODE
LOWtest/PHPMailer/ValidateAddressTest.php144 'TEST@example.org',CODE
LOWtest/PHPMailer/ValidateAddressTest.php145 '1234567890@example.org',CODE
LOWtest/PHPMailer/ValidateAddressTest.php146 'test+test@example.org',CODE
LOWtest/PHPMailer/ValidateAddressTest.php147 'test-test@example.org',CODE
65 more matches not shown…
Hyper-Verbose Identifiers81 hits · 82 pts
SeverityFileLineSnippetContext
LOWtest/PHPMailer/AddStringEmbeddedImageTest.php32 public function testHtmlStringEmbedNoName()CODE
LOWtest/PHPMailer/AddStringEmbeddedImageTest.php130 public function testFailToAttachException(CODE
LOWtest/PHPMailer/FileIsAccessibleTest.php82 public function testFileIsAccessibleFailsOnUnreadableFile()CODE
LOWtest/PHPMailer/AddStringAttachmentTest.php33 public function testAddPlainStringAttachment()CODE
LOWtest/PHPMailer/AddStringAttachmentTest.php118 public function testFailToAttachException(CODE
LOWtest/PHPMailer/CustomHeaderTest.php37 public function testAddAndGetCustomHeader($headers, $expected = null)CODE
LOWtest/PHPMailer/CustomHeaderTest.php67 public static function dataAddAndGetCustomHeader()CODE
LOWtest/PHPMailer/CustomHeaderTest.php163 public function testAddCustomHeaderInvalid($name, $value = null)CODE
LOWtest/PHPMailer/CustomHeaderTest.php173 public static function dataAddCustomHeaderInvalid()CODE
LOWtest/PHPMailer/CustomHeaderTest.php217 public function testClearCustomHeaderValue()CODE
LOWtest/PHPMailer/CustomHeaderTest.php259 public function testInvalidHeaderException()CODE
LOWtest/PHPMailer/DSNConfiguratorTest.php94 public function testConfigureSmtpWithoutAuthentication()CODE
LOWtest/PHPMailer/DSNConfiguratorTest.php108 public function testConfigureSmtpWithAuthentication()CODE
LOWtest/PHPMailer/DSNConfiguratorTest.php125 public function testConfigureSmtpWithoutPort()CODE
LOWtest/PHPMailer/DSNConfiguratorTest.php153 public function testConfigureSmtpsWithoutPort()CODE
LOWtest/PHPMailer/DSNConfiguratorTest.php173 public function testConfigureWithUnknownOption()CODE
LOWtest/PHPMailer/NormalizeBreaksTest.php94 public function testNormalizeBreaksWithCustomLineEnding()CODE
LOWtest/PHPMailer/MailTransportTest.php129 public function testMailSendWithSendmailParams()CODE
LOWtest/PHPMailer/MailTransportTest.php159 public function testSendmailSendWithSendmailParams()CODE
LOWtest/PHPMailer/DKIMWithoutExceptionsTest.php37 public function testDKIMSignOpenSSLNotAvailable()CODE
LOWtest/PHPMailer/PunyencodeAddressTest.php38 public function testPunyencodeAddressConversion($input, $charset, $expected)CODE
LOWtest/PHPMailer/PunyencodeAddressTest.php54 public static function dataPunyencodeAddressConversion()CODE
LOWtest/PHPMailer/PunyencodeAddressTest.php92 public function testPunyencodeAddressNoConversion($input, $charset, $expected)CODE
LOWtest/PHPMailer/PunyencodeAddressTest.php111 public static function dataPunyencodeAddressNoConversion()CODE
LOWtest/PHPMailer/SetFromTest.php106 public function testSetFromDoesNotOverruleSenderWithAutoFalse()CODE
LOWtest/PHPMailer/SetFromTest.php117 public function testSetFromDoesNotOverruleExistingSender()CODE
LOWtest/PHPMailer/SetFromTest.php159 public function testInvalidAddressException($address, $name = '')CODE
LOWtest/PHPMailer/EmptyMailerTest.php30 public function testSendWithEmptyMailerDoesNotCrash($mailer)CODE
LOWtest/PHPMailer/ValidateAddressTest.php73 public function testPatternsInvalidAddress($pattern)CODE
LOWtest/PHPMailer/PHPMailerTest.php45 public function testMultiplePlainFileAttachment()CODE
LOWtest/PHPMailer/PHPMailerTest.php69 public function testRejectNonLocalFileAttachment()CODE
LOWtest/PHPMailer/PHPMailerTest.php622 public function testEmbeddedImageCustomCidDomain()CODE
LOWtest/PHPMailer/PHPMailerTest.php862 public function testAddAttachmentEncodingException()CODE
LOWtest/PHPMailer/PHPMailerTest.php873 public function testAddFolderAsAttachment()CODE
LOWtest/PHPMailer/PHPMailerTest.php887 public function testDeletedAttachmentException()CODE
LOWtest/PHPMailer/PHPMailerTest.php902 public function testDeletedAttachmentError()CODE
LOWtest/PHPMailer/PHPMailerTest.php1236 public function testStrangeUnicodeEmailAddresses()CODE
LOWtest/PHPMailer/PHPMailerTest.php1249 public function testAutomaticEaiValidation()CODE
LOWtest/PHPMailer/DKIMTest.php54 public function testDKIMBodyCanonicalization()CODE
LOWtest/PHPMailer/DKIMTest.php89 public function testDKIMHeaderCanonicalization()CODE
LOWtest/PHPMailer/DKIMTest.php126 public function testDKIMOptionalHeaderFieldsCopy()CODE
LOWtest/PHPMailer/DKIMTest.php247 public function testDKIMSignOpenSSLNotAvailableException()CODE
LOWtest/PHPMailer/ReplyToGetSetClearTest.php40 public function testAddReplyToValidAddressNonIdn($address, $name = null, $expected = null)CODE
LOWtest/PHPMailer/ReplyToGetSetClearTest.php86 public static function dataAddReplyToValidAddressNonIdn()CODE
LOWtest/PHPMailer/ReplyToGetSetClearTest.php125 public function testAddReplyToInvalidAddressNonIdn($address)CODE
LOWtest/PHPMailer/ReplyToGetSetClearTest.php147 public function testAddReplyToInvalidAddressNonIdnException($address)CODE
LOWtest/PHPMailer/ReplyToGetSetClearTest.php161 public static function dataAddReplyToInvalidAddressNonIdn()CODE
LOWtest/PHPMailer/ReplyToGetSetClearTest.php181 public function testReplyToInMessageHeader($addresses, $expected)CODE
LOWtest/PHPMailer/ReplyToGetSetClearTest.php207 public static function dataReplyToInMessageHeader()CODE
LOWtest/PHPMailer/ReplyToGetSetClearTest.php265 public function testEnqueueAndAddIdnAddress()CODE
LOWtest/PHPMailer/ReplyToGetSetClearTest.php305 public function testNoDuplicateReplyToAddresses()CODE
LOWtest/PHPMailer/LocalizationTest.php134 public function testSetLanguageSuccessFallBackLogic($phrase, $langCode = null, $langPath = null)CODE
LOWtest/PHPMailer/LocalizationTest.php144 public static function dataSetLanguageSuccessFallBackLogic()CODE
LOWtest/PHPMailer/LocalizationTest.php282 public function testSetLanguageDoesNotExecuteCodeInLangFile()CODE
LOWtest/PHPMailer/LocalizationTest.php327 public function testSetLanguageDoesNotExecuteCodeWithBackticksInLangFile()CODE
LOWtest/PHPMailer/LocalizationTest.php358 public function testSetLanguageOnlyProcessesKnownKeys()CODE
LOWtest/PHPMailer/AddEmbeddedImageTest.php99 public function testAddingImageWithoutExplicitName()CODE
LOWtest/PHPMailer/AddEmbeddedImageTest.php142 public function testFailToAttachException(CODE
LOWtest/PHPMailer/ParseAddressesTest.php53 public function testAddressSplittingNative($addrstr, $expected, $charset = PHPMailer::CHARSET_ISO88591)CODE
LOWtest/PHPMailer/ParseAddressesTest.php80 public function testParseAddressesWithFalsyUseimapValues($useimap)CODE
21 more matches not shown…
Over-Commented Block7 hits · 7 pts
SeverityFileLineSnippetContext
LOW.phan/config.php21 ],COMMENT
LOWtest/fakepopserver.sh1#!/usr/bin/env bashCOMMENT
LOWtest/PHPMailer/PHPMailerTest.php1341 * @group slowCOMMENT
LOWlanguage/phpmailer.lang-fo.php21$PHPMAILER_LANG['provide_address'] = 'Tú skal uppgeva minst móttakara-emailadressu(r).';COMMENT
LOWlanguage/phpmailer.lang-fi.php21$PHPMAILER_LANG['provide_address'] = 'Aseta vähintään yksi vastaanottajan sähköpostiosoite.';COMMENT
LOW.github/workflows/tests.yml141 - name: Check out codeCOMMENT
LOWsrc/PHPMailer.php1901 //This sets the SMTP envelope sender which gets turned into a return-path header by the receiverCOMMENT
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMtest/fakesendmail.sh5#Create a temp folder to put messages inCOMMENT