Most free SEO checkers grade a website as if it competed with the whole internet. A dental clinic or a bar in Alicante competes with the three or four businesses that show up next to it on Google Maps. I wanted a checker for that case, so I built one for MapaLocal, the local marketing project I run in Spain. It is live (in Spanish) at mapalocal.es/herramientas/analizador-seo.

This post is about how it is put together and the decisions behind it.

The idea: rules score, the model explains

The tool runs 20+ deterministic checks and turns them into a 0–100 score. A language model never decides the score. It receives the measured results and writes the action plan: what to fix first, why and how, in plain language for a business owner.

That split matters for two reasons:

  • Reproducibility. The same page always gets the same score, and the thresholds are published on the page (title 30–65 characters, meta description 70–160, at least 300 words, alt text on 90%+ of images, server response under 1.5 s, and so on).
  • Honesty. The model can be wrong about wording, but it cannot inflate or deflate the grade.

The checks are grouped into four blocks: basic SEO, content, technical/mobile and local SEO. The local block looks for things generic checkers ignore: LocalBusiness structured data, a visible tel: link, a WhatsApp link, a link to the Google Maps listing and whether the page mentions the city.

Architecture: isolated from the main site

The main site is WordPress. I did not want a tool that fetches arbitrary URLs running inside it, so the analyzer is a separate Cloudflare Worker:

  • WordPress only renders the page and a small JS client.
  • The Worker fetches the target page, extracts signals, runs the checks, calls the model and stores results.
  • D1 (SQLite) holds a 7-day result cache, run logs, reports and unlock records.

Extraction uses HTMLRewriter, which streams the HTML instead of building a DOM. One gotcha: you can attach only one onEndTag handler per element, so JSON-LD capture and other script handlers had to be merged into one.

Fetching untrusted URLs safely

A "type any URL" box is an SSRF invitation. The fetcher:

  • accepts only http/https on standard ports, with a URL length cap;
  • resolves the hostname over DNS-over-HTTPS first and refuses private, loopback and link-local addresses;
  • follows redirects manually, re-validating every hop;
  • uses timeouts and reads the body with a byte cap, truncating large pages instead of buffering them;
  • downloads only the page itself, robots.txt and the sitemap.

Abuse and cost controls

The model costs real money, so every layer has a limit:

  • Cloudflare Turnstile on each request;
  • a Workers rate limit binding for bursts per IP;
  • a daily quota per visitor: 1 free analysis, 3 after leaving an email (an HMAC-signed unlock token tied to a recent report);
  • a global daily budget: each run reserves an estimated cost before calling the model and settles to the real cost afterwards;
  • cached results for 7 days, so re-analysing the same URL is free.

IPs are never stored in plain form, only a salted hash, and reports are deleted after 30 days.

The model call

The Worker uses the Anthropic TypeScript SDK with structured output defined by a Zod schema, so the response is validated JSON (priorities, impact, difficulty, steps, a proposed title and meta description) rather than free text I have to parse. If the model is unavailable, the user still gets the deterministic report.

PDF without a server

The full report downloads as a PDF, but the Worker does not render it. The browser already has every result on screen, so the PDF is built client-side with jsPDF, loaded on demand only when someone clicks the button. No extra server load, and no third service touching the data.

What I would tell anyone building a similar tool

  1. Keep the score deterministic and let the model explain it.
  2. Treat the URL input as hostile from day one.
  3. Put a budget cap in code, not just in a dashboard.
  4. Measure what matters to your users. For local businesses that is a tap-to-call phone and a Maps link more than a Lighthouse score.

The tool is free and needs no sign-up. Feedback is welcome, especially from people who build for small businesses.