#19 DeepSeek V4 Pro (DeepSeek Harness, Sub-Agents)

Quality

2026-08-25-deepseek-v4-pro · DeepSeek Harness 0.1.1-rc.2

Orchestrator Tool Calls

336

10 unique tools

Sub-agent Tool Calls

732

bash / read / write / edit

Sub-agents

4

DeepSeek Harness fork

Real Cost

$4.97

228.3M tokens

Tool Usage per Sub-agent

4 agents
Admin UI
296
Storefront UI
245
Database Seeders
148
2nd-Agent Verification
43

Code Quality Assessment

PHPMetrics

Code Quality Assessment

PHPMetrics 2.9.1

Classes

204

Lines of Code

7.8K

Avg MI

78.9

Avg Complexity

5.2

Est. Bugs

25.7

avg 0.126/class

Violations

0

0 errors, 0 warnings

Complexity Distribution

Low (CCN <= 5)
151 (74%)
Medium (6-10)
24 (11.8%)
High (> 10)
29 (14.2%)

Maintainability Distribution

Excellent (>= 85)
54 (26.5%)
Good (70-84)
24 (11.8%)
Moderate (55-69)
84 (41.2%)
Low (< 55)
42 (20.6%)

Most Complex Classes

Form

App\Livewire\Admin\Products

CCN 45

Show

App\Livewire\Storefront\Checkout

CCN 43

ShippingCalculator

App\Services

CCN 38

DiscountService

App\Services

CCN 38

Show

App\Livewire\Storefront\Products

CCN 36

Least Maintainable

OrderService

Services · CCN 24 · 98 LOC

CartService

Services · CCN 20 · 106 LOC

PricingEngine

Services · CCN 19 · 84 LOC

Shipping

Settings · CCN 24 · 168 LOC

Show

Checkout · CCN 43 · 264 LOC

Most Coupled Classes

Product

21

Order

21

CheckoutService

20

Store

19

User

19

Avg Efferent

2.94

Max LCOM

6

Notes

  • PHPMetrics flags 0 rule violations across 204 classes, with a healthy average MI of 78.9 - though 20.6% of classes still score below 55 (led by OrderService, CartService, and PricingEngine, all in App\Services).
  • SonarCloud tells a very different story on the same tree: 121 unresolved issues on PR #29 (13 bugs, 25 vulnerabilities, 83 code smells). The quality gate FAILED on new-code reliability (C), new-code security (C), AND new-code duplicated lines (4.3% vs a 3% threshold); only maintainability (A) and security-hotspot review (100%) passed.
  • The two most complex classes in the tree - the admin Product form (CCN 45) and the storefront checkout Show component (CCN 43) - are also two of the five least maintainable, a pattern that repeats across the build: complexity and low maintainability concentrate in the same handful of Livewire components and services rather than spreading evenly.
  • 7.8K class-LOC across 204 classes (38.3 LOC/class average) with an 8.4% comment ratio. Order and Product are the most-coupled domain models (21 dependents each), consistent with a checkout/catalog-centric data model.

SonarCloud Analysis

PR #29

Bugs

13

Vulnerabilities

25

Code Smells

83

Duplication

3.9%

Lines of Code

14,953

Reliability

C

13 bugs

Security

C

25 vulnerabilities

Maintainability

A

731min debt

Quality Gate Conditions

Reliability on New CodeC> 1
Security on New CodeC> 1
Maintainability on New CodeA> 1
Duplicated Lines on New Code4.3%> 3.0%
Security Hotspots Reviewed100.0%< 100%

Top Issues by Rule (121 unresolved total)

MAJORphp:S1172
27

Unused function parameters should be removed

Widespread across the API admin controllers (e.g. CollectionController) and several Livewire components - parameters accepted but never used inside the method body, mostly leftover from copy-pasted CRUD scaffolding.

MAJORphp:S2245
25

Using pseudorandom number generators (PRNGs) is security-sensitive

The single largest VULNERABILITY category (25 of 25 total vulnerabilities): non-cryptographic `rand()`/`mt_rand()`-family calls used for things like admin search settings and discount-code suggestion generation, flagged even where the actual security impact is low.

MAJORWeb:S6819
15

Prefer tag over ARIA role

Storefront overlay components (cart drawer, search modal) use `role="dialog"` on a plain `<div>` instead of the native `<dialog>` element.

CRITICALphp:S1192
11

String literals should not be duplicated

Repeated date-format strings (e.g. `"Y-m-d\TH:i"` 3x in the Discount admin form) and route/status literals duplicated instead of centralized into constants.

MAJORWeb:InputWithoutLabelCheck
8

Form inputs should have an associated label

Missing `id`/`<label for>` pairing on several admin form inputs (e.g. the product form) - the same class of accessibility gap our own manual QA found on the customer login/register pages, but SonarCloud catches it in admin Blade templates too.

MAJORphp:S1142
6

Functions should not contain too many return statements

Guard-clause-heavy methods, notably the storefront checkout `Show` Livewire component, exceed the 3-return threshold.

MAJORWeb:S7927
5

The accessible name should be part of the visible label

Storefront product-card component's accessible name doesn't match its visible text.

MAJORWeb:S5254
4

HTML elements should have a language attribute

Several storefront account auth pages (e.g. forgot-password) are missing `lang`/`xml:lang` on `<html>`/`<body>`.

CRITICALphp:S3776
4

Cognitive Complexity of functions should not be too high

Concentrated in admin Livewire form components (e.g. Products\Form at complexity 24 vs. the 15 allowed) that branch heavily across create/edit/variant-matrix state.