#02 Claude Code Sub-Agents

Quality

claude-subagents · v2.1.41

Files Created

358

366 unique

Total Tool Calls

1600

across 13 agents

Active Agents

12

contributing code

Estimated Cost

$61.97

981 API requests

Codebase Output

366 files

Files by Directory

resources/views
53
database/migrations
45
app/Models
44
database/factories
38
app/Livewire
37
tests/Feature
37
app/Enums
27
app/Services
18
database/seeders
15
app/Policies
11
app/Exceptions
8
app/Events
5
app/Jobs
4
app/ValueObjects
4
tests/Unit
4

Files per Agent (top 12)

Phase 1: Foundation setup
58w 5e
Phase 3: Themes and storefront
56w 5e
Phase 4: Cart, Checkout, Discounts
55w 1e
Phase 5: Payments, Orders, Fulfillment
47w 4e
Phase 2: Catalog system
43w 3e
Phase 7: Admin Panel
42w 3e
Phase 9-10: Analytics, Webhooks
28w 5e
Phase 6: Customer Accounts
21w 3e
Phase 8: Search with FTS5
14w 4e
Phase 11a: Comprehensive seeders
15w 1e
Phase 11b: Error pages and polish
2w 2e

Code Quality Assessment

PHPMetrics

Code Quality Assessment

PHPMetrics 2.9.1

Classes

150

Lines of Code

6.0K

Avg MI

89.7

Avg Complexity

4.5

Est. Bugs

12.4

Violations

0

0 errors

Complexity Distribution

Low (CCN <= 5)
117 (78%)
Medium (6-10)
18 (12%)
High (> 10)
15 (10%)

Maintainability Distribution

Excellent (>= 85)
82 (54.7%)
Good (70-84)
28 (18.7%)
Moderate (55-69)
35 (23.3%)
Low (< 55)
5 (3.3%)

Most Complex Classes

ClassCCNLOCMI
OrderService
App\Services
50174
56
DiscountService
App\Services
40141
59
SearchService
App\Services
36145
60
ProductService
App\Services
28128
65
ShippingCalculator
App\Services
27126
68

Least Maintainable Classes

ClassMICCNLOC
Checkout\Show
App\Livewire\Storefront
36
1284
Cart\Show
App\Livewire\Storefront
43
951
AggregateAnalytics
App\Jobs
47
631
Products\Form
App\Livewire\Admin
53
1671
Discounts\Form
App\Livewire\Admin
53
950

Most Coupled Classes

OrderService
17
AppServiceProvider
10
CheckoutService
9
PricingEngine
9
Register
8

Coupling Metrics

Avg Afferent (incoming)1.08
Avg Efferent (outgoing)2.97
Avg Instability0.79
Avg LCOM1.83
Max LCOM5

Halstead Metrics

Avg Volume247.7
Avg Difficulty4.40
Avg Bugs/Class0.083
Total Est. Bugs12.4
Comment Ratio25.29%
Avg LOC/Class40.2

SonarCloud Analysis

PR #3 - Quality Gate Failed
FAIL

Quality Gate: Failed

PR #3 · claude-subagentsmain

13.4h technical debt

103 issues total

View on SonarCloud

Bugs

1

C

Reliability

Vulnerabilities

0

A

Security

Code Smells

102

A

Maintainability

Hotspots

18

To review

Lines of Code

17.3K

PHP

Duplication

4.8%

on new code

Coverage

0%

not configured

Issues by Severity

Critical
29
Major
27
Minor
47
Total103

Security Hotspots (18)

Weak Cryptography
MEDIUM10

Pseudorandom number generation in seeders

Insecure Protocol (HTTP)
LOW8

Hardcoded HTTP URLs in test configuration

Top Issue Rules

Cognitive ComplexityS3776
6
CRITICAL
Duplicate String LiteralsS1192
12
CRITICAL
Unused Local VariablesS1481
15
MINOR
Excessive Return StatementsS1142
8
MAJOR
Nested Ternary OperationsS3358
4
MAJOR
Unused Function ParametersS1172
5
MAJOR
Commented-Out CodeS125
3
MAJOR
Field Naming ConventionS116
20
MINOR

Highest complexity: OrderService, DiscountService, and SearchService exceed the cognitive complexity threshold. 47 minor issues are primarily unused variables in test files and snake_case naming conventions.