/blog
Unoptimized images contain redundant data. Compress them to improve LCP.
Unoptimized JPEG/PNG images contain metadata and redundant pixel data. Lossless or lossy compression can cut size 30-60% with no perceptible quality difference — directly improving LCP.
// Intervention Image v3 — optimize on upload
use Intervention\Image\ImageManager;
use Intervention\Image\Drivers\Gd\Driver;
$manager = new ImageManager(new Driver());
$manager->read($path)
->toWebp(quality: 80)
->save(storage_path('app/public/images/hero.webp'));
// Storing raw upload with no compression
$request->file('image')->store('images'); // may be a 4 MB JPEG
JavaScript shipped to the browser but never executed wastes bandwidth and parse time.
Unused JavaScript still costs network bandwidth, parse time, and CPU. The browser must download, parse, and compile every byte you ship — even if it never executes.
// Lazy-load route-specific JS
const Dashboard = () => import('./Dashboard.js');
// Or use @vite directive in Blade
@vite(['resources/js/app.js'])
<!-- Loading the entire bundle on every page -->
<script src="/build/everything.js"></script>
<script src="/build/assets/app-abc.js"></script>
A query pattern repeated above the configured threshold during this audit.
N+1 queries happen when accessing a relation inside a loop without eager loading. Each iteration triggers a separate SQL query — 100 items = 101 queries.
// Eager-load the relationship
$users = User::with('posts')->get();
foreach ($users as $user) {
echo $user->posts->count();
}
// 1 + N queries — fires a SELECT for each user
$users = User::all();
foreach ($users as $user) {
echo $user->posts->count();
}
Repeated queries
SELECT * FROM posts WHERE user_id = ?
app/Http/Controllers/BlogController.php:42
SELECT * FROM comments WHERE post_id = ?
app/View/Components/PostCard.php:18
Each page should have exactly one H1 heading that describes the page content.
A meta description improves click-through rate in search results.
Images without alt text are invisible to search engines and screen readers.
main > section.hero > img
<img src="/images/hero.jpg" loading="eager">
|
Type
|
Count
|
Size
|
|---|---|---|
| script | 13 | 595 KB |
| stylesheet | 2 | 136 KB |
| image | 22 | 466 KB |
| font | 4 | 79 KB |
| document | 1 | 36 KB |
|
Entity
|
Transfer
|
Blocking
|
Main thread
|
|---|---|---|---|
| Google Tag Manager | 55 KB | 410ms | |
| Facebook Pixel | 37 KB | 180ms | 220ms |
| Google Analytics | 23 KB | 90ms | 140ms |
|
URL
|
Type
|
Size
|
Duration
|
|---|---|---|---|
vendor.js
|
371 KB | ||
products
|
24 KB |
Resources with cache TTL under 30 days. Long-term caching reduces repeat-visit load times.
https://example.test/old.js
https://example.test/font.woff2
app.js
210ms
vendor.js
222ms