The classic email sending library for PHP
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).
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.
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.
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.
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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | README.md | 111 | $mail->Username = 'user@example.com'; //SMTP username | CODE |
| LOW⚡ | test/PHPMailer/MailTransportTest.php | 124 | * php -d sendmail_path="/usr/sbin/sendmail -t -i -frpath@example.org" ./vendor/bin/phpunit | COMMENT |
| LOW⚡ | test/PHPMailer/MailTransportTest.php | 131 | $sender = 'rpath@example.org'; | CODE |
| LOW⚡ | test/PHPMailer/MailTransportTest.php | 154 | * php -d sendmail_path="/usr/sbin/sendmail -t -i -frpath@example.org" ./vendor/bin/phpunit | COMMENT |
| LOW⚡ | test/PHPMailer/MailTransportTest.php | 161 | $sender = 'rpath@example.org'; | CODE |
| LOW⚡ | test/PHPMailer/MailTransportTest.php | 232 | 'rpath@example.org' | CODE |
| LOW⚡ | test/PHPMailer/MailTransportTest.php | 237 | 'rpath@example.org', | CODE |
| LOW⚡ | test/PHPMailer/MailTransportTest.php | 240 | '/opt/sendmail -x -y -fuser@example.org', | CODE |
| LOW⚡ | test/PHPMailer/MailTransportTest.php | 242 | 'user@example.org', | CODE |
| LOW⚡ | test/PHPMailer/MailTransportTest.php | 245 | '/opt/sendmail -X /path/to/logfile -fuser@example.org', | CODE |
| LOW⚡ | test/PHPMailer/MailTransportTest.php | 247 | 'user@example.org', | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 55 | 'message' => 'Lorem ipsum dolor sit amet.', | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 55 | 'message' => 'Lorem ipsum dolor sit amet.', | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 56 | 'expected' => 'Lorem ipsum dolor sit amet.' . PHPMailer::getLE(), | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 56 | 'expected' => 'Lorem ipsum dolor sit amet.' . PHPMailer::getLE(), | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 60 | 'message' => 'Lorem ipsum dolor sit amet.', | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 60 | 'message' => 'Lorem ipsum dolor sit amet.', | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 61 | 'expected' => 'Lorem ipsum dolor sit amet.' . PHPMailer::getLE(), | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 61 | 'expected' => 'Lorem ipsum dolor sit amet.' . PHPMailer::getLE(), | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 65 | 'message' => 'Lorem ipsum dolor' . PHPMailer::CRLF, | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 66 | 'expected' => 'Lorem ipsum dolor' . PHPMailer::getLE(), | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 69 | 'message' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.' | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 69 | 'message' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.' | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 72 | 'expected' => 'Lorem ipsum dolor sit amet, consectetur adipiscing' . PHPMailer::getLE() | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 72 | 'expected' => 'Lorem ipsum dolor sit amet, consectetur adipiscing' . PHPMailer::getLE() | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 80 | 'message' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.' | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 80 | 'message' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.' | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 83 | 'expected' => 'Lorem ipsum dolor sit amet, consectetur adipiscing =' . PHPMailer::getLE() | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 83 | 'expected' => 'Lorem ipsum dolor sit amet, consectetur adipiscing =' . PHPMailer::getLE() | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 91 | 'message' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. =' . PHPMailer::CRLF | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 91 | 'message' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. =' . PHPMailer::CRLF | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 95 | 'expected' => 'Lorem ipsum dolor sit amet, consectetur adipiscing =' . PHPMailer::getLE() | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 95 | 'expected' => 'Lorem ipsum dolor sit amet, consectetur adipiscing =' . PHPMailer::getLE() | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 104 | 'message' => 'Lorem ipsumdolorsitametconsetetursadipscingelitrseddiamnonumy', | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 110 | 'message' => 'Lorem ipsumdolorsitametconsetetursadipscingelitrseddiamnonumy', | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 111 | 'expected' => 'Lorem ipsumdolorsitametconsetetursadipscingelitrs=' . PHPMailer::getLE() | CODE |
| LOW⚡ | test/PHPMailer/WrapTextTest.php | 116 | 'message' => 'Lorem ipsumdolorsitametconsetetursadipscingelitrseddiam=' . PHPMailer::CRLF | CODE |
| LOW | test/PHPMailer/EmptyMailerTest.php | 33 | $this->Mail->addAddress('whoto@example.com', 'John Doe'); | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 122 | 'first@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 123 | 'first.last@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 124 | '1234567890123456789012345678901234567890123456789012345678901234@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 125 | '"first\"last"@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 126 | '"first@last"@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 127 | '"first\last"@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 131 | '"first\last"@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 132 | '"Abc\@def"@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 133 | '"Fred\ Bloggs"@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 134 | '"Joe.\Blow"@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 135 | '"Abc@def"@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 136 | 'user+mailbox@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 137 | 'customer/department=shipping@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 138 | '$A12345@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 139 | '!def!xyz%abc@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 140 | '_somename@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 142 | 'peter.piper@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 143 | 'test@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 144 | 'TEST@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 145 | '1234567890@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 146 | 'test+test@example.org', | CODE |
| LOW⚡ | test/PHPMailer/ValidateAddressTest.php | 147 | 'test-test@example.org', | CODE |
| 65 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/PHPMailer/AddStringEmbeddedImageTest.php | 32 | public function testHtmlStringEmbedNoName() | CODE |
| LOW | test/PHPMailer/AddStringEmbeddedImageTest.php | 130 | public function testFailToAttachException( | CODE |
| LOW | test/PHPMailer/FileIsAccessibleTest.php | 82 | public function testFileIsAccessibleFailsOnUnreadableFile() | CODE |
| LOW | test/PHPMailer/AddStringAttachmentTest.php | 33 | public function testAddPlainStringAttachment() | CODE |
| LOW | test/PHPMailer/AddStringAttachmentTest.php | 118 | public function testFailToAttachException( | CODE |
| LOW | test/PHPMailer/CustomHeaderTest.php | 37 | public function testAddAndGetCustomHeader($headers, $expected = null) | CODE |
| LOW | test/PHPMailer/CustomHeaderTest.php | 67 | public static function dataAddAndGetCustomHeader() | CODE |
| LOW | test/PHPMailer/CustomHeaderTest.php | 163 | public function testAddCustomHeaderInvalid($name, $value = null) | CODE |
| LOW | test/PHPMailer/CustomHeaderTest.php | 173 | public static function dataAddCustomHeaderInvalid() | CODE |
| LOW | test/PHPMailer/CustomHeaderTest.php | 217 | public function testClearCustomHeaderValue() | CODE |
| LOW | test/PHPMailer/CustomHeaderTest.php | 259 | public function testInvalidHeaderException() | CODE |
| LOW | test/PHPMailer/DSNConfiguratorTest.php | 94 | public function testConfigureSmtpWithoutAuthentication() | CODE |
| LOW | test/PHPMailer/DSNConfiguratorTest.php | 108 | public function testConfigureSmtpWithAuthentication() | CODE |
| LOW | test/PHPMailer/DSNConfiguratorTest.php | 125 | public function testConfigureSmtpWithoutPort() | CODE |
| LOW | test/PHPMailer/DSNConfiguratorTest.php | 153 | public function testConfigureSmtpsWithoutPort() | CODE |
| LOW | test/PHPMailer/DSNConfiguratorTest.php | 173 | public function testConfigureWithUnknownOption() | CODE |
| LOW | test/PHPMailer/NormalizeBreaksTest.php | 94 | public function testNormalizeBreaksWithCustomLineEnding() | CODE |
| LOW⚡ | test/PHPMailer/MailTransportTest.php | 129 | public function testMailSendWithSendmailParams() | CODE |
| LOW⚡ | test/PHPMailer/MailTransportTest.php | 159 | public function testSendmailSendWithSendmailParams() | CODE |
| LOW | test/PHPMailer/DKIMWithoutExceptionsTest.php | 37 | public function testDKIMSignOpenSSLNotAvailable() | CODE |
| LOW | test/PHPMailer/PunyencodeAddressTest.php | 38 | public function testPunyencodeAddressConversion($input, $charset, $expected) | CODE |
| LOW | test/PHPMailer/PunyencodeAddressTest.php | 54 | public static function dataPunyencodeAddressConversion() | CODE |
| LOW | test/PHPMailer/PunyencodeAddressTest.php | 92 | public function testPunyencodeAddressNoConversion($input, $charset, $expected) | CODE |
| LOW | test/PHPMailer/PunyencodeAddressTest.php | 111 | public static function dataPunyencodeAddressNoConversion() | CODE |
| LOW | test/PHPMailer/SetFromTest.php | 106 | public function testSetFromDoesNotOverruleSenderWithAutoFalse() | CODE |
| LOW | test/PHPMailer/SetFromTest.php | 117 | public function testSetFromDoesNotOverruleExistingSender() | CODE |
| LOW | test/PHPMailer/SetFromTest.php | 159 | public function testInvalidAddressException($address, $name = '') | CODE |
| LOW | test/PHPMailer/EmptyMailerTest.php | 30 | public function testSendWithEmptyMailerDoesNotCrash($mailer) | CODE |
| LOW | test/PHPMailer/ValidateAddressTest.php | 73 | public function testPatternsInvalidAddress($pattern) | CODE |
| LOW | test/PHPMailer/PHPMailerTest.php | 45 | public function testMultiplePlainFileAttachment() | CODE |
| LOW | test/PHPMailer/PHPMailerTest.php | 69 | public function testRejectNonLocalFileAttachment() | CODE |
| LOW | test/PHPMailer/PHPMailerTest.php | 622 | public function testEmbeddedImageCustomCidDomain() | CODE |
| LOW | test/PHPMailer/PHPMailerTest.php | 862 | public function testAddAttachmentEncodingException() | CODE |
| LOW | test/PHPMailer/PHPMailerTest.php | 873 | public function testAddFolderAsAttachment() | CODE |
| LOW | test/PHPMailer/PHPMailerTest.php | 887 | public function testDeletedAttachmentException() | CODE |
| LOW | test/PHPMailer/PHPMailerTest.php | 902 | public function testDeletedAttachmentError() | CODE |
| LOW | test/PHPMailer/PHPMailerTest.php | 1236 | public function testStrangeUnicodeEmailAddresses() | CODE |
| LOW | test/PHPMailer/PHPMailerTest.php | 1249 | public function testAutomaticEaiValidation() | CODE |
| LOW | test/PHPMailer/DKIMTest.php | 54 | public function testDKIMBodyCanonicalization() | CODE |
| LOW | test/PHPMailer/DKIMTest.php | 89 | public function testDKIMHeaderCanonicalization() | CODE |
| LOW | test/PHPMailer/DKIMTest.php | 126 | public function testDKIMOptionalHeaderFieldsCopy() | CODE |
| LOW | test/PHPMailer/DKIMTest.php | 247 | public function testDKIMSignOpenSSLNotAvailableException() | CODE |
| LOW | test/PHPMailer/ReplyToGetSetClearTest.php | 40 | public function testAddReplyToValidAddressNonIdn($address, $name = null, $expected = null) | CODE |
| LOW | test/PHPMailer/ReplyToGetSetClearTest.php | 86 | public static function dataAddReplyToValidAddressNonIdn() | CODE |
| LOW | test/PHPMailer/ReplyToGetSetClearTest.php | 125 | public function testAddReplyToInvalidAddressNonIdn($address) | CODE |
| LOW | test/PHPMailer/ReplyToGetSetClearTest.php | 147 | public function testAddReplyToInvalidAddressNonIdnException($address) | CODE |
| LOW | test/PHPMailer/ReplyToGetSetClearTest.php | 161 | public static function dataAddReplyToInvalidAddressNonIdn() | CODE |
| LOW | test/PHPMailer/ReplyToGetSetClearTest.php | 181 | public function testReplyToInMessageHeader($addresses, $expected) | CODE |
| LOW | test/PHPMailer/ReplyToGetSetClearTest.php | 207 | public static function dataReplyToInMessageHeader() | CODE |
| LOW | test/PHPMailer/ReplyToGetSetClearTest.php | 265 | public function testEnqueueAndAddIdnAddress() | CODE |
| LOW | test/PHPMailer/ReplyToGetSetClearTest.php | 305 | public function testNoDuplicateReplyToAddresses() | CODE |
| LOW | test/PHPMailer/LocalizationTest.php | 134 | public function testSetLanguageSuccessFallBackLogic($phrase, $langCode = null, $langPath = null) | CODE |
| LOW | test/PHPMailer/LocalizationTest.php | 144 | public static function dataSetLanguageSuccessFallBackLogic() | CODE |
| LOW | test/PHPMailer/LocalizationTest.php | 282 | public function testSetLanguageDoesNotExecuteCodeInLangFile() | CODE |
| LOW | test/PHPMailer/LocalizationTest.php | 327 | public function testSetLanguageDoesNotExecuteCodeWithBackticksInLangFile() | CODE |
| LOW | test/PHPMailer/LocalizationTest.php | 358 | public function testSetLanguageOnlyProcessesKnownKeys() | CODE |
| LOW | test/PHPMailer/AddEmbeddedImageTest.php | 99 | public function testAddingImageWithoutExplicitName() | CODE |
| LOW | test/PHPMailer/AddEmbeddedImageTest.php | 142 | public function testFailToAttachException( | CODE |
| LOW | test/PHPMailer/ParseAddressesTest.php | 53 | public function testAddressSplittingNative($addrstr, $expected, $charset = PHPMailer::CHARSET_ISO88591) | CODE |
| LOW | test/PHPMailer/ParseAddressesTest.php | 80 | public function testParseAddressesWithFalsyUseimapValues($useimap) | CODE |
| 21 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .phan/config.php | 21 | ], | COMMENT |
| LOW | test/fakepopserver.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | test/PHPMailer/PHPMailerTest.php | 1341 | * @group slow | COMMENT |
| LOW | language/phpmailer.lang-fo.php | 21 | $PHPMAILER_LANG['provide_address'] = 'Tú skal uppgeva minst móttakara-emailadressu(r).'; | COMMENT |
| LOW | language/phpmailer.lang-fi.php | 21 | $PHPMAILER_LANG['provide_address'] = 'Aseta vähintään yksi vastaanottajan sähköpostiosoite.'; | COMMENT |
| LOW | .github/workflows/tests.yml | 141 | - name: Check out code | COMMENT |
| LOW | src/PHPMailer.php | 1901 | //This sets the SMTP envelope sender which gets turned into a return-path header by the receiver | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | test/fakesendmail.sh | 5 | #Create a temp folder to put messages in | COMMENT |