I’m a marketer. I can read a PageSpeed report. I can see that Google doesn’t like my LCP or that an image is too large.
The problem for me has always been fixing those issues - mostly due to the time it takes, but also some technical limitations.
That’s normally where it gets handed to a developer. Or, on WordPress, you install another performance plugin, change some settings, and hope the score gets covered up.
I wanted to see if Claude Code could do the bit in between: audit the site, find the cause, change the code, test it, and keep going until it was fixed.
It could.
Why I moved from WordPress to a static site
I recently moved all my websites from WordPress to a static site running on Cloudflare.
This particular site is where I share my marketing guides, but it was full of bloat with the theme, plugins, optimization plugins, caching, and everything sitting on top of it.
A static site pre-builds the pages and serves them as files. Cloudflare Pages then caches those assets across its CDN automatically. Cloudflare actually recommends avoiding custom caching in most Pages setups because its defaults already handle it.
That doesn’t mean WordPress is slow. But performance can depend heavily on the theme, plugins, scripts, and configuration you’ve built over time.
The data isn’t exactly supportive either - HTTP Archive’s Web Almanac found only 45% of WordPress sites passed Core Web Vitals on mobile, with a median mobile Lighthouse performance score of 41.
But while moving to static removed a lot of the fluff, it didn’t improve much in terms of page performance.
If you plan on tackling this kind of improvement, consider moving to static first (depending on the functions on your site). If you remain on your CMS you may need to provide Claude Code MCP access or the theme files to improve the performance.
One 7.1MB image was destroying the speed of 136 articles
I gave Claude Code the repository and told it not to give me recommendations.
It had to establish a Lighthouse baseline across different page types, test mobile and desktop, find the causes, make the changes, rebuild, retest, visually check the site, and test production after deployment.
The biggest problem was right there in front of me the whole time:
Every article hero was loading the full original image. On the page Claude profiled, that was a 7.1MB PNG.
Because the same article template was used across the site, 136 pages had the same problem.
Mobile Lighthouse performance was 75.
Largest Contentful Paint was 35 seconds.
Claude changed the shared image handling so the browser got responsive WebP versions around 60–150KB instead.
The result:

Mobile performance: 75 → 100
Desktop performance: 76 → 100
Mobile LCP: 35 seconds → Under 2 seconds
136 article pages fixed through one shared template
A caching plugin would not have made a 7.1MB image stop being 7.1MB.
Claude found problems I wouldn’t have known to look for
Once Claude could inspect the site properly, it found more issues.
It fixed colour-contrast failures, broken heading hierarchies in old WordPress content, and render-blocking CSS.
It replaced third-party requests with local images and later deferred Analytics tasks that were competing during page load.
It also built permanent Lighthouse checks into GitHub so future changes can fail automatically if performance, accessibility, or SEO regress.
The first production-ready optimization pass took about 65 minutes.
I then sampled more article types, investigated a misleading PageSpeed run, and improved the checks.
The entire process was still under two hours.
I didn’t spend two hours learning responsive image syntax, Lighthouse automation, GitHub Actions, and Cloudflare deployment.
Claude did the technical work, and I just watched - so technically, the time I spent on this was no more than 15 minutes.
The workflow: make Claude audit, fix, and prove the result
If you have Claude Code connected to your site repository, don’t start with: Make my website faster.
Give it a process.
Test several page templates, not just the homepage.
Establish mobile and desktop baselines before changing anything.
Prioritise shared problems that affect many URLs.
Make Claude implement the fixes, not just explain them.
Re-run Lighthouse after every meaningful change.
Test the live site after deployment.
Sample multiple pages. One PageSpeed run can fluctuate.
Add automated checks so the problem doesn’t quietly return.
Here’s the shortened prompt I’d use:
Audit this site for Lighthouse/PageSpeed performance, accessibility, best practices and SEO on mobile and desktop. Test representative page templates and save a baseline. Do not only recommend fixes: identify the root cause, make the changes, rebuild, retest and continue iterating. Prioritize shared issues affecting many URLs. Preserve design and functionality. Then visually QA the site, deploy through the existing workflow, retest production URLs and add CI checks for future regressions. Stop and give me exact instructions only if you need an action or access you cannot perform yourself.
The bigger opportunity with AI is the work that gets put off
Some of the biggest opportunities with AI aren’t the flashy new things. They’re the jobs we already know need doing but keep pushing back because they’re boring, time-consuming, too technical, or too big to justify starting.
Website performance is a good example.
I knew my site could be faster. I knew there were probably technical problems buried across hundreds of pages. But auditing everything, finding the causes, fixing them, testing the changes, and making sure nothing broke was a huge task and one that I have never focused on for any site.
The same applies to other things marketers put off: cleaning up years of redirects, finding broken internal links, fixing inconsistent metadata and schema, auditing tracking scripts, standardizing old content, or working through hundreds of accessibility issues.
AI is more useful when you stop asking, ‘What new thing can I make with this?’ and start asking:
What have I been avoiding because it would normally take too much time, effort, or technical knowledge to fix?
I have built tools for almost everything mentioned here, which I will be sharing in the future.
