AI Slop Code RIsk Monitor

googleapis/google-api-php-client

A PHP client library for accessing Google APIs

8.3 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for googleapis/google-api-php-client, a PHP project with 9,813 GitHub stars. SynthScan examined 13,620 lines of code across 92 source files, recording 105 pattern matches distributed across 5 syntactic categories. The legacy adjusted pattern signal is 8.3 (Moderate 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.

8.3
Adjusted Signal
8.3
Raw Pattern Score
100%
Time Factor
2026-09-25
Last Push
9.8K
Stars
PHP
Language
13.6K
Lines of Code
92
Files
105
Pattern Hits
2026-10-12
Scan Date
0.01
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 31.9/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 2.9/100 · LOW

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

Agent Over-Engineering Ratio 29.7/100 · MEDIUM

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

PR Review Velocity Impact 33.2/100 · MEDIUM

Which changes need focused human review? 105 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

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

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 0HIGH 1MEDIUM 0LOW 104

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 105 distinct pattern matches across 5 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 Identifiers95 hits · 96 pts
SeverityFileLineSnippetContext
LOWtests/BaseTest.php156 protected function checkServiceAccountCredentials()CODE
LOWtests/Google/ModelTest.php170 public function testCollectionWithItemsFromConstructor()CODE
LOWtests/Google/ModelTest.php197 public function testCollectionWithItemsFromSetter()CODE
LOWtests/Google/ModelTest.php244 public function testPassingInstanceInConstructor()CODE
LOWtests/Google/ModelTest.php256 public function testPassingInstanceInConstructorForMap()CODE
LOWtests/Google/ModelTest.php279 public function testKeyTypePropertyConflict()CODE
LOWtests/Google/ClientTest.php262 public function testDefaultLoggerAppEngine()CODE
LOWtests/Google/ClientTest.php274 public function testLoggerFromConstructor()CODE
LOWtests/Google/ClientTest.php313 public function testSetAccessTokenValidation()CODE
LOWtests/Google/ClientTest.php393 public function testApplicationDefaultCredentials()CODE
LOWtests/Google/ClientTest.php408 public function testApplicationDefaultCredentialsWithSubject()CODE
LOWtests/Google/ClientTest.php428 public function testRefreshTokenSetsValues()CODE
LOWtests/Google/ClientTest.php463 public function testRefreshTokenIsSetOnRefresh()CODE
LOWtests/Google/ClientTest.php499 public function testRefreshTokenIsNotSetWhenNewRefreshTokenIsReturned()CODE
LOWtests/Google/ClientTest.php536 public function testFetchAccessTokenWithAssertionFromEnv()CODE
LOWtests/Google/ClientTest.php552 public function testFetchAccessTokenWithAssertionFromFile()CODE
LOWtests/Google/ClientTest.php568 public function testFetchAccessTokenWithAssertionAddsCreated()CODE
LOWtests/Google/ClientTest.php584 public function testBadSubjectThrowsException()CODE
LOWtests/Google/ClientTest.php692 public function testOnGceCacheAndCacheOptions()CODE
LOWtests/Google/ClientTest.php733 public function testFetchAccessTokenWithAssertionCache()CODE
LOWtests/Google/ClientTest.php790 public function testExecuteSetsCorrectHeaders()CODE
LOWtests/Google/ClientTest.php874 public function testCredentialsOptionWithFetchAuthTokenInterface()CODE
LOWtests/Google/ClientTest.php939 public function testQueryParamsForAuthUrl()CODE
LOWtests/Google/ClientTest.php948 public function testUniverseDomainMismatch()CODE
LOWtests/Google/AccessToken/VerifyTest.php73 public function testLeewayIsUnchangedWhenPassingInJwt()CODE
LOWtests/Google/AuthHandler/AuthHandlerTest.php33 public function testSetAccessTokenResultsInAuthCacheMiss()CODE
LOWtests/Google/Http/RESTTest.php92 public function testRequestExceptionWithResponseIsHandled()CODE
LOWtests/Google/Http/RESTTest.php108 public function testRequestExceptionWithoutResponseIsRethrown()CODE
LOWtests/Google/Http/MediaFileUploadTest.php138 public function testGetResumeUriUsesStringHeaderValues()CODE
LOWtests/Google/Http/MediaFileUploadTest.php192 public function testNextChunkWithMoreRemaining()CODE
LOWtests/Google/Http/BatchTest.php70 public function testParseResponseMatchesResponsesToRequestsByContentId()CODE
LOWtests/Google/Task/ComposerTest.php54 public function testRelatePathServiceName()CODE
LOW⚡tests/Google/Task/RunnerTest.php49 public function testRestRetryOffByDefault($errorCode, $errorBody = '{}')CODE
LOW⚡tests/Google/Task/RunnerTest.php58 public function testOneRestRetryWithError($errorCode, $errorBody = '{}')CODE
LOW⚡tests/Google/Task/RunnerTest.php68 public function testMultipleRestRetriesWithErrors(CODE
LOW⚡tests/Google/Task/RunnerTest.php326 public function testTaskRetryOffByDefault()CODE
LOW⚡tests/Google/Task/RunnerTest.php334 public function testOneTaskRetryWithError()CODE
LOW⚡tests/Google/Task/RunnerTest.php343 public function testMultipleTaskRetriesWithErrors()CODE
LOW⚡tests/Google/Task/RunnerTest.php352 public function testOneTaskRetryWithSuccess()CODE
LOW⚡tests/Google/Task/RunnerTest.php362 public function testMultipleTaskRetriesWithSuccess()CODE
LOWtests/Google/Task/RunnerTest.php81 public function testOneRestRetryWithSuccess($errorCode, $errorBody = '{}')CODE
LOWtests/Google/Task/RunnerTest.php94 public function testMultipleRestRetriesWithSuccess(CODE
LOWtests/Google/Task/RunnerTest.php109 public function testCustomRestRetryMapReplacesDefaults(CODE
LOWtests/Google/Task/RunnerTest.php121 public function testCustomRestRetryMapAddsNewHandlers()CODE
LOWtests/Google/Task/RunnerTest.php138 public function testCustomRestRetryMapWithCustomLimits($limit)CODE
LOWtests/Google/Task/RunnerTest.php170 public function testCurlRetryOffByDefault($errorCode, $errorMessage = '')CODE
LOWtests/Google/Task/RunnerTest.php181 public function testOneCurlRetryWithError($errorCode, $errorMessage = '')CODE
LOWtests/Google/Task/RunnerTest.php193 public function testMultipleCurlRetriesWithErrors(CODE
LOWtests/Google/Task/RunnerTest.php207 public function testOneCurlRetryWithSuccess($errorCode, $errorMessage = '')CODE
LOWtests/Google/Task/RunnerTest.php221 public function testMultipleCurlRetriesWithSuccess(CODE
LOWtests/Google/Task/RunnerTest.php237 public function testCustomCurlRetryMapReplacesDefaults(CODE
LOWtests/Google/Task/RunnerTest.php252 public function testCustomCurlRetryMapAddsNewHandlers()CODE
LOWtests/Google/Task/RunnerTest.php270 public function testCustomCurlRetryMapWithCustomLimits($limit)CODE
LOWtests/Google/Task/RunnerTest.php375 public function testTaskRetryWithCustomLimits($limit)CODE
LOWtests/Google/Task/RunnerTest.php400 public function testTaskWithManualRetries()CODE
LOWtests/Google/Task/RunnerTest.php513 public static function assertTaskTimeGreaterThanOrEqual(CODE
LOWtests/Google/Task/RunnerTest.php695 private function setNextTaskAllowedRetries($allowedRetries)CODE
LOWtests/Google/Task/RunnerTest.php709 private function setNextTasksAllowedRetries($count, $allowedRetries)CODE
LOWtests/Google/Service/AdSenseTest.php56 public function testAccountsReportGenerate()CODE
LOWtests/Google/Service/AdSenseTest.php75 public function testAccountsAdClientsList()CODE
35 more matches not shown…
Structural Annotation Overuse5 hits · 8 pts
SeverityFileLineSnippetContext
LOWdocs/oauth-web.md72### Step 1: Set authorization parametersCOMMENT
LOWdocs/oauth-web.md198### Step 2: Redirect to Google's OAuth 2.0 serverCOMMENT
LOWdocs/oauth-web.md216### Step 3: Google prompts user for consentCOMMENT
LOWdocs/oauth-web.md222### Step 4: Handle the OAuth 2.0 server responseCOMMENT
LOWdocs/oauth-web.md257### Step 5: Exchange authorization code for refresh and access tokensCOMMENT
Magic Placeholder Names1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHREADME.md258POST https://datastore.googleapis.com/v1beta3/projects/YOUR_PROJECT_ID:runQuery?key=YOUR_API_KEYCODE
Fake / Example Data3 hits · 3 pts
SeverityFileLineSnippetContext
LOWUPGRADING.md173$user_to_impersonate = 'user@example.org';CODE
LOWUPGRADING.md187$user_to_impersonate = 'user@example.org';CODE
LOWtests/Google/ClientTest.php144 $client->setLoginHint('bob@example.org');CODE
Over-Commented Block1 hit · 1 pts
SeverityFileLineSnippetContext
LOWUPGRADING.md101COMMENT