AI Slop Code Risk Monitor

PHPOffice/PHPWord

SlopCodeMonitor badge for PHPOffice/PHPWord Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

A pure PHP library for reading and writing word processing documents

3.5 Low pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for PHPOffice/PHPWord, a PHP project with 7,590 GitHub stars. SynthScan examined 94,449 lines of code across 679 source files, recording 341 pattern matches distributed across 4 syntactic categories. The legacy adjusted pattern signal is 3.5 (Low pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

3.5
Adjusted Signal
3.5
Raw Pattern Score
100%
Time Factor
2026-11-09
Last Push
7.6K
Stars
PHP
Language
94.4K
Lines of Code
679
Files
341
Pattern Hits
2026-11-11
Scan Date
0.00
HC Hit Rate

Risk Review · Payload v1

Use each vector to guide manual verification of the underlying findings.

Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-11-11.

Cognitive Ownership Risk 15.4/100 · LOW

Can maintainers explain intent, assumptions, and trade-offs? 331 finding(s).

Hallucinated Dependency & Supply Chain Risk 1.1/100 · LOW

Are imports declared and package/API names verified? 10 finding(s).

Agent Over-Engineering Ratio 13.9/100 · LOW

Are wrappers, guards, and repeated structures necessary? 285 finding(s).

PR Review Velocity Impact 16.9/100 · LOW

Which changes need focused human review? 341 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

Run additional scans to build a history of the legacy pattern signal. Score changes are not a measure of AI adoption or code quality.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 1HIGH 0MEDIUM 0LOW 340

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 341 distinct pattern matches across 4 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers285 hits · 282 pts
SeverityFileLineSnippetContext
LOWtests/PhpWordTests/TemplateProcessorTest.php90 public function xtestTemplateCanBeSavedInTemporaryLocation(string $templateFqfn, TemplateProcessor $templateProcessoCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php137 public function testXslStyleSheetCanBeApplied(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php173 public function testXslStyleSheetCanNotBeAppliedOnFailureOfSettingParameterValue(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php201 public function testXslStyleSheetCanNotBeAppliedOnFailureOfLoadingXmlFromTemplate(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php272 public function testCloneRowWithCustomMacro(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php354 public function testCloneNotExistingRowShouldThrowException(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php368 public function testCloneRowAndSetValuesWithCustomMacro(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php429 public function testMacrosCanBeReplacedInHeaderAndFooter(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php450 public function testCustomMacrosCanBeReplacedInHeaderAndFooter(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php487 public function testSetValueWithCustomMacro(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php553 public function testSetComplexValueWithCustomMacro(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php687 public function testSetValuesWithCustomMacro(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php782 public function testSetCheckboxWithCustomMacro(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php937 public function testSetImageValueMetafile(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php985 public function testSetImageValueInvalidImage(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php997 public function testSetImageValueUnsupportedImage(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php1009 private function getImageTemplateProcessor(): TemplateProcessorCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php1048 public function testGetVariableCountCountsHowManyTimesEachPlaceholderIsPresent(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php1085 public function testGetVariableCountCountsHowManyTimesEachPlaceholderIsPresentWithCustomMacro(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php1123 public function testCloneBlockCanCloneABlockTwice(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php1176 public function testCloneBlockCanCloneABlockTwiceWithCustomMacro(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php1260 public function testCloneBlockWithCustomMacro(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php1290 public function testCloneBlockWithVariables(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php1321 public function testCloneBlockWithVariablesAndCustomMacro(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php1350 public function testCloneBlockWithVariableReplacements(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php1383 public function testCloneBlockWithVariableReplacementsAndCustomMacro(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php1453 public function testFixBrokenMacrosWithCustomMacro(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php1483 public function testMainPartNameDetection(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php1495 public function testMainPartNameDetectionWithCustomMacro(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php1525 public function testGetVariablesWithCustomMacro(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php1559 public function testTextNeedsSplittingWithCustomMacro(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php1589 public function testSplitTextIntoTextsWithCustomMacro(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php1644 public function testFindXmlBlockStartWithCustomMacro(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php1688 public function testShouldReturnFalseIfXmlBlockNotFound(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php1715 public function testShouldReturnFalseIfXmlBlockNotFoundWithCustomMacro(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php1743 public function testShouldMakeFieldsUpdateOnOpen(): voidCODE
LOWtests/PhpWordTests/TemplateProcessorTest.php1757 public function testShouldMakeFieldsUpdateOnOpenWithCustomMacro(): voidCODE
LOWtests/PhpWordTests/SettingsTest.php110 public function testSetGetOutputEscapingEnabled(): voidCODE
LOWtests/PhpWordTests/SettingsTest.php177 public function testSetGetMeasurementUnit(): voidCODE
LOWtests/PhpWordTests/SettingsTest.php191 public function testPhpTempDirIsUsedByDefault(): voidCODE
LOWtests/PhpWordTests/SettingsTest.php214 public function testSetGetDefaultFontName(): voidCODE
LOWtests/PhpWordTests/SettingsTest.php228 public function testSetGetDefaultAsianFontName(): voidCODE
LOWtests/PhpWordTests/SettingsTest.php242 public function testSetGetDefaultFontSize(): voidCODE
LOWtests/PhpWordTests/SettingsTest.php262 public function testSetGetDefaultFontColor(): voidCODE
LOWtests/PhpWordTests/AbstractWebServerEmbedded.php57 protected static function getRemoteImageUrlWithoutExtension(): stringCODE
LOWtests/PhpWordTests/PhpWordTest.php65 public function testSetGetDefaultFontName(): voidCODE
LOWtests/PhpWordTests/PhpWordTest.php77 public function testSetGetDefaultFontSize(): voidCODE
LOWtests/PhpWordTests/PhpWordTest.php89 public function testSetGetDefaultAsianFontName(): voidCODE
LOWtests/PhpWordTests/PhpWordTest.php101 public function testSetGetDefaultFontColor(): voidCODE
LOWtests/PhpWordTests/PhpWordTest.php113 public function testSetDefaultParagraphStyle(): voidCODE
LOWtests/PhpWordTests/PhpWordTest.php181 public function testGetNotExistingSection(): voidCODE
LOWtests/PhpWordTests/IOFactoryTest.php72 public function testExistingWriterCanBeCreated(): voidCODE
LOWtests/PhpWordTests/IOFactoryTest.php83 public function testNonexistentWriterCanNotBeCreated(): voidCODE
LOWtests/PhpWordTests/IOFactoryTest.php92 public function testExistingReaderCanBeCreated(): voidCODE
LOWtests/PhpWordTests/IOFactoryTest.php103 public function testNonexistentReaderCanNotBeCreated(): voidCODE
LOW⚡tests/PhpWordTests/MediaTest.php35 public function testGetSectionMediaElementsWithNull(): voidCODE
LOW⚡tests/PhpWordTests/MediaTest.php43 public function testGetHeaderMediaElementsWithNull(): voidCODE
LOW⚡tests/PhpWordTests/MediaTest.php51 public function testGetFooterMediaElementsWithNull(): voidCODE
LOW⚡tests/PhpWordTests/MediaTest.php59 public function testCountSectionMediaElementsWithNull(): voidCODE
LOW⚡tests/PhpWordTests/MediaTest.php67 public function testAddSectionMediaElement(): voidCODE
225 more matches not shown…
Over-Commented Block46 hits · 32 pts
SeverityFileLineSnippetContext
LOWtests/PhpWordTests/Shared/ZipArchiveTest.php41// {COMMENT
LOWsamples/Sample_07_TemplateCloneRow.php61$templateProcessor->cloneRowAndSetValues('userId', $values);COMMENT
LOWsrc/PhpWord/Reader/MsDoc.php201COMMENT
LOWsrc/PhpWord/Reader/MsDoc.php221 // envrCOMMENT
LOWsrc/PhpWord/Reader/MsDoc.php2121 } else {COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php1<?phpCOMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php21// this software the author can not be responsible.COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php41//define( 'PCLZIP_SEPARATOR', ' ' );COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php61// - MUST be a valid, already created directoryCOMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php81// --------------------------------------------------------------------------------COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php181// Attributes :COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php201COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php221 }COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php241 // are added in the archive. See the parameters description for theCOMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php261 // PCLZIP_OPT_REMOVE_ALL_PATH :COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php401 if ($v_result != 1) {COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php421 // $p_filelist : An array containing file or directory names, orCOMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php581 // ----- ReturnCOMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php601 // folder : true | falseCOMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php641 if (($v_result = $this->privList($p_list)) != 1) {COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php661 // you can indicate this in the optional $p_remove_path parameter.COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php801COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php821 // Options :COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php961 // ----- Call the extracting fctCOMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php1061 // Function : properties()COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php1181 return $v_result;COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php1321 // --------------------------------------------------------------------------------COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php1361 }COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php1381 // $p_size) and generate an array with the options and values ($v_result_list).COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php1941COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php2261 $this->privSwapBackMagicQuotes();COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php2321 $this->zip_fd = 0;COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php2381 if (($v_result = $this->privWriteCentralHeader($v_count, $v_size, $v_offset, $v_comment)) != 1) {COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php2701 // ----- Update the informationsCOMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php2961 // --------------------------------------------------------------------------------COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php3101 // --------------------------------------------------------------------------------COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php3141 // --------------------------------------------------------------------------------COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php3441 $this->privSwapBackMagicQuotes();COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php4261 }COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php4441 $p_central_dir['disk_start'] = $v_data['disk_start'];COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php4721 return $v_result;COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php4941COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php5101 }COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php5181// $p_dir.COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php5301 }COMMENT
LOWsrc/PhpWord/Shared/PCLZip/pclzip.lib.php5361COMMENT
Fake / Example Data9 hits · 10 pts
SeverityFileLineSnippetContext
LOW⚡tests/PhpWordTests/Writer/Word2007/Element/TOCTest.php67 $staticHtml = '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus.CODE
LOW⚡tests/PhpWordTests/Writer/Word2007/Element/TOCTest.php67 $staticHtml = '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus.CODE
LOWdocs/usage/template.md121$templateProcessor->setValue('Name', 'John Doe');CODE
LOWsamples/Sample_05_Multicolumn.php8$filler = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. 'CODE
LOWsamples/Sample_05_Multicolumn.php8$filler = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. 'CODE
LOWsamples/Sample_26_Html.php23$html .= '<p style="text-align: justify; text-indent: 70.9pt; line-height: 150%;">Lorem ipsum dolor sit amet, <strong>coCODE
LOWsamples/Sample_26_Html.php23$html .= '<p style="text-align: justify; text-indent: 70.9pt; line-height: 150%;">Lorem ipsum dolor sit amet, <strong>coCODE
LOWsamples/Sample_13_Images.php37$text = str_repeat('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore CODE
LOWsamples/Sample_13_Images.php37$text = str_repeat('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore CODE
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippetContext
CRITICALsamples/bootstrap/js/jquery.min.js5}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.CODE