Repository Analysis

PHPOffice/PhpSpreadsheet

A pure PHP library for reading and writing spreadsheet files

4.1 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of PHPOffice/PhpSpreadsheet, a PHP project with 13,951 GitHub stars. SynthScan v2.0 examined 324,913 lines of code across 2695 source files, recording 1268 pattern matches distributed across 5 syntactic categories. The overall adjusted score of 4.1 places this repository in the Likely human-written 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).

4.1
Adjusted Score
4.1
Raw Score
100%
Time Factor
2026-07-12
Last Push
14.0K
Stars
PHP
Language
324.9K
Lines of Code
2.7K
Files
1.3K
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 1HIGH 0MEDIUM 1LOW 1266

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 1268 distinct pattern matches across 5 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.

Hyper-Verbose Identifiers1166 hits · 1218 pts
SeverityFileLineSnippetContext
LOWinfra/LocaleGenerator.php129 protected function writeConfigArgumentSeparator($configFile, string $column): voidCODE
LOWinfra/LocaleGenerator.php145 protected function writeConfigCurrencySymbol($configFile, string $column): voidCODE
LOWinfra/LocaleGenerator.php163 protected function buildFunctionsFileForLocale(string $column, string $locale): voidCODE
LOWinfra/DocumentGenerator.php22 public static function generateFunctionListByCategory($phpSpreadsheetFunctions): stringCODE
LOWinfra/DocumentGenerator.php74 private static function getPhpSpreadsheetFunctionText(mixed $functionCall): stringCODE
LOWinfra/DocumentGenerator.php94 public static function generateFunctionListByName(array $phpSpreadsheetFunctions, bool $compact = false): stringCODE
LOWtests/Benchmark/CsvStreamingEncodingTest.php65 public static function providerExistingEncodings(): arrayCODE
LOWtests/Benchmark/CsvStreamingEncodingTest.php290 public function testLargeFileProducesCorrectResults(): voidCODE
LOWtests/Benchmark/CsvStreamingEncodingTest.php572 public function testLoadFromStringWithConvertedEncoding(): voidCODE
LOWtests/Benchmark/CsvStreamingEncodingTest.php591 public function testGuessEncodingWithStreaming(string $filename): voidCODE
LOWtests/Benchmark/CsvStreamingEncodingTest.php602 public static function providerGuessEncodingStreaming(): arrayCODE
LOWtests/Benchmark/SpreadsheetCopyBenchmarkTest.php31 private function createPopulatedSpreadsheet(): SpreadsheetCODE
LOWtests/Benchmark/SpreadsheetCopyBenchmarkTest.php114 public function testCloneVsSerializeBenchmark(): voidCODE
LOWtests/Benchmark/XlsxStreamingReadTest.php80 public function testStreamingLoadsIdenticalToSimpleXml(): voidCODE
LOWtests/Benchmark/XlsxStreamingReadTest.php113 public function testStreamingNumericCells(): voidCODE
LOWtests/Benchmark/XlsxStreamingReadTest.php127 public function testStreamingSharedStrings(): voidCODE
LOWtests/Benchmark/XlsxStreamingReadTest.php141 public function testStreamingBooleanCells(): voidCODE
LOWtests/Benchmark/XlsxStreamingReadTest.php153 public function testStreamingFormulaCells(): voidCODE
LOWtests/Benchmark/XlsxStreamingReadTest.php171 public function testStreamingBooleanFormulaCalculatedValue(): voidCODE
LOWtests/Benchmark/XlsxStreamingReadTest.php184 public function testStreamingWithExistingXlsxFile(): voidCODE
LOWtests/Benchmark/XlsxStreamingReadTest.php228 public function testStreamingInlineString(): voidCODE
LOWtests/Benchmark/XlsxStreamingReadTest.php292 public function testStreamingMultipleSheets(): voidCODE
LOWtests/Benchmark/XlsxStreamingReadTest.php330 public function testStreamingLargeCoordinates(): voidCODE
LOWtests/Benchmark/XlsxStreamingReadTest.php359 public function testStreamingDateFormattedCells(): voidCODE
LOWtests/Benchmark/XlsxStreamingReadTest.php399 public function testStreamingStyleIndexHandling(): voidCODE
LOWtests/Benchmark/XlsxStreamingReadTest.php446 public function testStreamingSharedFormulas(): voidCODE
LOWtests/Benchmark/XlsxStreamingReadTest.php505 public function testStreamingReadDataOnlyFalseWithFormulas(): voidCODE
LOWtests/Benchmark/XlsxStreamingReadTest.php536 public function testStreamingEmptyValueCells(): voidCODE
LOWtests/Benchmark/XlsxStreamingReadTest.php571 public function testStreamingCalculatedValuePreserved(): voidCODE
LOWtests/Benchmark/XlsxStreamingReadTest.php597 public function testStreamingStringFormula(): voidCODE
LOWtests/Benchmark/XlsxStreamingReadTest.php623 public function testStreamingRealSharedFormulae(): voidCODE
LOWtests/Benchmark/XlsxStreamingReadTest.php686 public function testStreamingFullComparisonWithStyles(): voidCODE
LOWtests/Benchmark/XlsxStreamingReaderBenchmarkTest.php89 public function testStreamingReaderPerformanceAndCorrectness(): voidCODE
LOWtests/Benchmark/FormulaTokenCacheBenchmarkTest.php41 public function testParseFormulaCacheEnabledVsDisabled(): voidCODE
LOWtests/Benchmark/FormulaTokenCacheBenchmarkTest.php108 public function testParseFormulaCacheVsNocache(): voidCODE
LOWtests/Benchmark/CsvStreamingEncodingBenchmarkTest.php175 public function testMemoryScalingWithFileSize(): voidCODE
LOWtests/Benchmark/XlsxStreamingReadClass.php353 private function storeStreamingFormulaAttributes(SimpleXMLElement $f, Worksheet $docSheet, string $r): voidCODE
LOWtests/PhpSpreadsheetTests/IOFactoryRegisterTest.php36 public function testRegisterInvalidWriter(): voidCODE
LOWtests/PhpSpreadsheetTests/IOFactoryRegisterTest.php43 public function testRegisterInvalidReader(): voidCODE
LOWtests/PhpSpreadsheetTests/DefinedNameTest.php41 public function testAddDuplicateDefinedName(): voidCODE
LOWtests/PhpSpreadsheetTests/DefinedNameTest.php56 public function testAddScopedDefinedNameWithSameName(): voidCODE
LOWtests/PhpSpreadsheetTests/DefinedNameTest.php89 public function testRemoveGlobalDefinedName(): voidCODE
LOWtests/PhpSpreadsheetTests/DefinedNameTest.php101 public function testRemoveGlobalDefinedNameWhenDuplicateNames(): voidCODE
LOWtests/PhpSpreadsheetTests/DefinedNameTest.php118 public function testRemoveScopedDefinedNameWhenDuplicateNames(): voidCODE
LOWtests/PhpSpreadsheetTests/DefinedNameTest.php135 public function testDefinedNameNoWorksheetNoScope(): voidCODE
LOWtests/PhpSpreadsheetTests/NamedFormulaTest.php42 public function testAddDuplicateNamedRange(): voidCODE
LOWtests/PhpSpreadsheetTests/NamedFormulaTest.php60 public function testAddScopedNamedFormulaWithSameName(): voidCODE
LOWtests/PhpSpreadsheetTests/NamedFormulaTest.php98 public function testRemoveGlobalNamedFormulaWhenDuplicateNames(): voidCODE
LOWtests/PhpSpreadsheetTests/NamedFormulaTest.php118 public function testRemoveScopedNamedFormulaWhenDuplicateNames(): voidCODE
LOWtests/PhpSpreadsheetTests/NamedFormulaTest.php138 public function testRemoveNonExistentNamedFormula(): voidCODE
LOWtests/PhpSpreadsheetTests/SpreadsheetCopyCloneTest.php216 public function testCopySheetCountMatches(string $type): voidCODE
LOWtests/PhpSpreadsheetTests/SpreadsheetCopyCloneTest.php268 public function testCopyNamedRangesReferenceNewSpreadsheet(string $type): voidCODE
LOWtests/PhpSpreadsheetTests/SpreadsheetCopyCloneTest.php294 public function testCopyCanBeSavedWithoutErrors(string $type): voidCODE
LOWtests/PhpSpreadsheetTests/SpreadsheetCopyCloneTest.php333 public function testCopyWorksheetsAreIndependent(string $type): voidCODE
LOWtests/PhpSpreadsheetTests/RichTextTest.php15 public function testConstructorSpecifyingCell(): voidCODE
LOWtests/PhpSpreadsheetTests/ReferenceHelperTest.php121 public function testUpdateFormulaForMultipleWorksheets(string $formula, int $insertRows, int $insertColumns, string CODE
LOWtests/PhpSpreadsheetTests/ReferenceHelperTest.php130 public static function providerMultipleWorksheetFormulaUpdates(): arrayCODE
LOWtests/PhpSpreadsheetTests/ReferenceHelperTest.php135 public function testInsertNewBeforeRetainDataType(): voidCODE
LOWtests/PhpSpreadsheetTests/ReferenceHelperTest.php154 public function testRemoveColumnShiftsCorrectColumnValueIntoRemovedColumnCoordinates(): voidCODE
LOWtests/PhpSpreadsheetTests/ReferenceHelperTest.php183 public function testInsertRowsWithPageBreaks(): voidCODE
1106 more matches not shown…
Over-Commented Block83 hits · 83 pts
SeverityFileLineSnippetContext
LOWtests/PhpSpreadsheetTests/Chart/ChartCloneTest.php201 ), // 2011COMMENT
LOWtests/PhpSpreadsheetTests/Chart/ChartMethodTest.php41 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // 2010COMMENT
LOW…/PhpSpreadsheetTests/Chart/GridlinesShadowGlowTest.php61 // Cell reference for dataCOMMENT
LOWtests/PhpSpreadsheetTests/Chart/AxisGlowTest.php41 ['Q4', 30, 32, 0],COMMENT
LOWtests/PhpSpreadsheetTests/Chart/AxisGlowTest.php61 // Number of datapoints in seriesCOMMENT
LOWtests/PhpSpreadsheetTests/Chart/AxisGlowTest.php181 ];COMMENT
LOWtests/PhpSpreadsheetTests/Chart/DataTableTest.php81 ];COMMENT
LOWtests/PhpSpreadsheetTests/Chart/LegendColorTest.php61 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), //Max / OpenCOMMENT
LOWtests/PhpSpreadsheetTests/Chart/AxisPropertiesTest.php61 // Format CodeCOMMENT
LOWtests/PhpSpreadsheetTests/Chart/MultiplierTest.php41 $dataSeriesLabels = [COMMENT
LOWtests/PhpSpreadsheetTests/Chart/PR3163Test.php61 // DatatypeCOMMENT
LOWtests/PhpSpreadsheetTests/Chart/PieFillTest.php61 DataSeriesValues::DATASERIES_TYPE_STRING,COMMENT
LOW…s/PhpSpreadsheetTests/Chart/GridlinesLineStyleTest.php61 // Cell reference for dataCOMMENT
LOW…s/PhpSpreadsheetTests/Chart/GridlinesLineStyleTest.php241 );COMMENT
LOWtests/PhpSpreadsheetTests/Chart/DataSeriesColorTest.php61 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // was 2010COMMENT
LOW…ts/PhpSpreadsheetTests/Chart/DataSeriesValues2Test.php41 ]COMMENT
LOWtests/PhpSpreadsheetTests/Chart/AxisShadowTest.php41 ['Q4', 30, 32, 0],COMMENT
LOWtests/PhpSpreadsheetTests/Chart/AxisShadowTest.php61 // Number of datapoints in seriesCOMMENT
LOW…s/PhpSpreadsheetTests/Calculation/ParseFormulaTest.php341 [COMMENT
LOW…s/PhpSpreadsheetTests/Calculation/ParseFormulaTest.php361 // [COMMENT
LOWtests/data/Calculation/Statistical/LINEST.php81 ],COMMENT
LOWtests/data/Calculation/Statistical/LINEST.php101 // [2517, 4, 4, 55],COMMENT
LOWtests/data/Calculation/Statistical/COUNTIFS.php21 ['C', 'B', 'A', 'B', 'B'],COMMENT
LOWtests/data/Calculation/Statistical/LOGEST.php41 [COMMENT
LOWtests/data/Calculation/Statistical/LOGEST.php61 // [COMMENT
LOWsamples/Chart33a/33_Chart_create_area.php21 ['Q4', 30, 32, 0],COMMENT
LOWsamples/Chart33a/33_Chart_create_area.php41// Number of datapoints in seriesCOMMENT
LOWsamples/Chart33a/33_Chart_create_column.php21 ['Q4', 30, 32, 0],COMMENT
LOWsamples/Chart33a/33_Chart_create_column.php41// Number of datapoints in seriesCOMMENT
LOWsamples/Chart33a/33_Chart_create_bar_stacked.php21 ['Q4', 30, 32, 0],COMMENT
LOWsamples/Chart33a/33_Chart_create_bar_stacked.php41// Number of datapoints in seriesCOMMENT
LOWsamples/Chart33a/33_Chart_create_bar_custom_colors.php41// Set the X-Axis LabelsCOMMENT
LOWsamples/Chart33a/33_Chart_create_bar_custom_colors.php101// Add the chart to the worksheetCOMMENT
LOWsamples/Chart33a/33_Chart_create_bar_custom_colors.php121// Data valuesCOMMENT
LOWsamples/Chart33a/33_Chart_create_line.php41// Cell reference for dataCOMMENT
LOWsamples/Chart33a/33_Chart_create_column_2.php41 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // 'Budget'COMMENT
LOWsamples/Chart33a/33_Chart_create_bubble.php41COMMENT
LOWsamples/Chart33a/33_Chart_create_area_2.php41// DatatypeCOMMENT
LOWsamples/Chart33a/33_Chart_create_area_3.php41 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$D$1', null, 1), // 2012COMMENT
LOWsamples/Chart33a/33_Chart_create_bar_labels_lines.php41$dataSeriesLabels1 = [COMMENT
LOWsamples/Chart33a/33_Chart_create_bar_labels_lines.php141// Set the X-Axis LabelsCOMMENT
LOWsamples/Chart33b/33_Chart_create_multiple_charts.php21 ['Q4', 30, 32, 0],COMMENT
LOWsamples/Chart33b/33_Chart_create_multiple_charts.php41// Number of datapoints in seriesCOMMENT
LOWsamples/Chart33b/33_Chart_create_multiple_charts.php101// Cell reference for dataCOMMENT
LOWsamples/Chart33b/33_Chart_create_pie_custom_colors.php41// Set the X-Axis LabelsCOMMENT
LOWsamples/Chart33b/33_Chart_create_pie_custom_colors.php101// Add the chart to the worksheetCOMMENT
LOWsamples/Chart33b/33_Chart_create_pie_custom_colors.php121// Data valuesCOMMENT
LOW…mples/Chart33b/33_Chart_create_scatter5_trendlines.php61// DatatypeCOMMENT
LOWsamples/Chart33b/33_Chart_create_scatter3.php41 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$C$1', null, 1), // was 2011COMMENT
LOWsamples/Chart33b/33_Chart_create_scatter2.php41 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), // was 2010COMMENT
LOWsamples/Chart33b/33_Chart_create_stock2.php41 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), //Max / OpenCOMMENT
LOWsamples/Chart33b/33_Chart_create_pie.php21 ['Q3', 52, 61, 69],COMMENT
LOWsamples/Chart33b/33_Chart_create_pie.php101// DatatypeCOMMENT
LOWsamples/Chart33b/33_Chart_create_radar.php41$dataSeriesLabels = [COMMENT
LOWsamples/Chart33b/33_Chart_create_stock.php41 new DataSeriesValues(DataSeriesValues::DATASERIES_TYPE_STRING, 'Worksheet!$B$1', null, 1), //Max / OpenCOMMENT
LOWsamples/templates/chartSpreadsheet.php21);COMMENT
LOWsrc/PhpSpreadsheet/Reader/Xls.php41// Modelled moreso after Perl Excel Parse/Write modulesCOMMENT
LOWsrc/PhpSpreadsheet/Reader/Xls.php401 // offset: 4; size: 2; OS versionCOMMENT
LOWsrc/PhpSpreadsheet/Reader/Xls.php541 {COMMENT
LOWsrc/PhpSpreadsheet/Reader/Xls.php2961 // offset: 20: size: variable; formula structureCOMMENT
23 more matches not shown…
Fake / Example Data17 hits · 22 pts
SeverityFileLineSnippetContext
LOWtests/PhpSpreadsheetTests/Writer/Ods/ContentTest.php66 $worksheet1->setCellValue('E1', 'Lorem ipsum'); // StringCODE
LOWtests/PhpSpreadsheetTests/Writer/Ods/ContentTest.php88 $worksheet1->setCellValueExplicit('G1', 'Lorem ipsum', DataType::TYPE_INLINE);CODE
LOW…s/PhpSpreadsheetTests/Writer/Html/TextRotationTest.php19 $sheet->setCellValue('A7', 'Lorem Ipsum');CODE
LOW…s/PhpSpreadsheetTests/Writer/Mpdf/TextRotationTest.php19 $sheet->setCellValue('A7', 'Lorem Ipsum');CODE
LOW…PhpSpreadsheetTests/Writer/Dompdf/TextRotationTest.php19 $sheet->setCellValue('A7', 'Lorem Ipsum');CODE
LOW…pSpreadsheetTests/Writer/Dompdf/PaperSizeArrayTest.php36 $sheet->setCellValue('A7', 'Lorem Ipsum');CODE
LOW…pSpreadsheetTests/Writer/Dompdf/PaperSizeArrayTest.php56 $sheet->setCellValue('A7', 'Lorem Ipsum');CODE
LOWtests/data/Writer/Ods/content-with-data.xml87 <text:p>Lorem ipsum</text:p>CODE
LOWtests/data/Writer/Ods/content-with-data.xml93 <text:p>Lorem ipsum</text:p>CODE
LOWsamples/Pdf/21b_Pdf.php12 $lorem = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolCODE
LOWsamples/Pdf/21b_Pdf.php12 $lorem = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolCODE
LOWsamples/templates/sampleSpreadsheet2.php322// Llorem ipsum...COMMENT
LOWsamples/templates/sampleSpreadsheet2.php323$sLloremIpsum = 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vivamus eget ante. Sed cursus nunc semper torCODE
LOWsamples/templates/sampleSpreadsheet2.php323$sLloremIpsum = 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vivamus eget ante. Sed cursus nunc semper torCODE
LOWsamples/templates/sampleSpreadsheet.php322// Llorem ipsum...COMMENT
LOWsamples/templates/sampleSpreadsheet.php323$sLloremIpsum = 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vivamus eget ante. Sed cursus nunc semper torCODE
LOWsamples/templates/sampleSpreadsheet.php323$sLloremIpsum = 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vivamus eget ante. Sed cursus nunc semper torCODE
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippetContext
CRITICALsamples/bootstrap/js/jquery.min.js2!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):fCODE
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMsrc/PhpSpreadsheet/Reader/Xlsx.php1937 // But in some cases, this attribute isn't set; so we need to delve a level deeper and look atCOMMENT