=== Persqo for Business Sites ===
Contributors: gkob1133
Tags: geo, ai visibility, llms.txt, security headers, contact form test
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.4.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Does ChatGPT recommend your business? Find out free, fix it in one click. AI visibility, real visitor tests and safe fixes with Undo.

== Description ==

**Does ChatGPT recommend your business? Find out free, fix it in one click.**

Right after you connect, Persqo asks an AI engine three questions a customer would ask, and shows whether your business is named, in what position, the exact answer, its sources, and who is named instead. The GEO tab then follows ChatGPT, Perplexity, Gemini and Claude over time on paid plans. If an engine is temporarily unavailable, the plugin says so and never shows a made up answer.

Persqo for Business Sites runs a site test on your business or brochure website and shows the results in your WordPress admin. It is made for sites that bring in leads (calls, messages, bookings, sign-ups and contact forms). Persqo reads your home page to tell what kind of site it is (a service business or clinic, a lead or directory site, a software or membership site, a content site or an online store) and gives the test visitor the goal that fits. You can also choose the kind of site yourself.

Each site test checks:

* Navigation: every main menu link opens a working page.
* Contact form: the form exists, has a submit button and labeled fields. With your opt-in, the test sends it once with clearly marked test content and checks that your site confirms it.
* Contact buttons: phone (tel:), WhatsApp, email (mailto:) and booking links are well formed and open.
* Site search, if your site has one.
* Phone screens: the home page fits a phone and has a viewport tag.
* Speed: how long the home page takes to show its main content, measured in a real browser.
* GEO and SEO basics: title and meta description, Organization or LocalBusiness schema, llms.txt, and the canonical URL.

Results include the detected kind of site, the visitor's goal, a score, each finding with steps, impact, a suggested fix and a screenshot, and a link to a shareable report.

= One-click fixes =

For eleven safe, mechanical fixes, the plugin shows a preview of what will change and the values Persqo suggests, lets you edit them, and applies them with one click:

* Home page title and meta description. With Yoast SEO, Rank Math, All in One SEO, SEOPress or The SEO Framework, the values are saved in that plugin's own fields. The plugin never prints a second title or description.
* Organization or LocalBusiness schema (JSON-LD). With SEOPress or The SEO Framework it is saved in their own organization settings; with another SEO plugin you get a link to its settings. Skipped when your SEO plugin or theme already prints it.
* llms.txt for AI assistants, served at /llms.txt when your site has none.
* The viewport meta tag for phones, only when it is missing.
* An FAQ block with FAQPage schema, built from the questions people ask AI about businesses like yours. You write the answers; questions without an answer are left out.
* A call to action link (for example "Sign up", "Book a consultation" or WhatsApp) in your header menu, including the menu an Elementor header uses, and as a button at the bottom of each page.
* Security headers: X-Content-Type-Options, Referrer-Policy, X-Frame-Options and a conservative Permissions-Policy, on front end pages only (never WP admin). A header your server already sends is skipped. HSTS (only on a site that is all HTTPS, with a short max-age first) and a Content-Security-Policy in Report-Only mode are separate opt-ins. A full CSP is never set, because it can break sites.
* Test content: published posts and pages that look like test, demo, debug or sample content (for example "test", "בדיקה", "Hello world!", "Sample Page" or lorem ipsum). You tick each one; it moves to Draft and is never deleted. Undo publishes it again with its original date.
* Form labels: missing or English labels on form fields, added in your site's language (for example "שם מלא", "טלפון", "אימייל" and "הודעה" on a Hebrew site), in the form's own settings for Contact Form 7, Elementor Forms, WPForms and Gravity Forms. The original form is kept for Undo. Otherwise a small, clearly marked inline script adds aria-label attributes to that one form.
* A missing H1: a heading block at the top of the page, the page title your theme hid, or, on an Elementor page, the first heading widget made the H1 when it is the page's main heading. Otherwise the plugin shows the steps.
* Speed basics: native lazy-loading for images below the fold, decoding="async", fetchpriority="high" on the main image, and deferring a short list of known safe scripts (never jQuery or theme scripts). Any part WP Rocket, LiteSpeed Cache, Autoptimize, Perfmatters, W3 Total Cache, SG Optimizer or Jetpack Boost already handles is skipped and shown as handled by that plugin. The re-test measures load time again; if the page got slower or a script error appeared, the fix rolls itself back and says so.

Every fix has Undo and a "Re-test this finding" button that checks the live site. Each change is in the activity log. After each fix the plugin clears page caches with your cache plugin's own purge function, so the re-test sees the change. Fixes are text, links and settings that this plugin stores in its own options (with a backup of anything it changes); Persqo never sends code to your site. Uninstalling the plugin undoes every fix. Every other finding comes with a fix prompt to copy or send to your developer.

= Compatible with =

Detected automatically, on your site only (nothing about it is sent anywhere). Persqo writes into their own settings and never duplicates tags.

* SEO: Yoast SEO, Rank Math, All in One SEO, SEOPress, The SEO Framework.
* Page builders and themes: Elementor and Elementor Pro, Hello Elementor, Divi, Astra, GeneratePress, Kadence.
* Forms: Contact Form 7, Elementor Forms, WPForms, Gravity Forms.
* Cache and speed: WP Rocket, LiteSpeed Cache, Autoptimize, W3 Total Cache, WP Super Cache, SG Optimizer, Jetpack Boost, Perfmatters.
* Stores: WooCommerce.
* Multilingual: WPML and Polylang. Form labels are added in each form's own language where the plugin knows the words; forms in other languages keep their labels, with a note to translate them.

= Plans =

The plugin is free to use with a free Persqo account, with every feature and smaller quantities: one site test a month, all eleven one-click fixes with three applies a month (Undo and re-test never count), a monthly GEO scan of five questions on one AI engine plus the free check at connect, Autopilot with one cycle and one break alert a month, security basics, and a shareable report. When a limit is reached, the plugin says exactly what was used and when it resets. WP Plus ($19 a month) adds weekly tests, unlimited fixes, and a monthly GEO scan on ChatGPT and Perplexity. WP Pro ($49) adds daily tests, a weekly GEO scan on all four engines compared with three competitors, and three visitor personas. Agency ($149) covers ten sites with white-label reports. What each plan includes is decided by your Persqo account, not by code in this plugin. See https://persqo.com/pricing/wordpress

= Autopilot (optional, off by default) =

Turn on Autopilot and confirm, and Persqo tests your site on a schedule (weekly, or daily), then applies only the fix types you ticked, checks them on the live page, and rolls back any fix that breaks the page or makes a check worse. Every change is in the activity log with Undo. You can get a summary by email after each cycle (sent with wp_mail to your site's admin address, only if you turn it on). Pause stops everything; deactivating the plugin pauses it; uninstalling removes the schedules on your site and on Persqo. Each scheduled test uses one test from your Persqo plan; when the plan has none left, no test runs and nothing extra is charged.

Right to left languages such as Hebrew are supported in the admin screens, in suggested link text and in llms.txt.

The settings page also shows your Persqo plan and usage: when usage resets, how much of each allowance you used, whether overage is on, and links to upgrade or manage billing.

= Contact form safety =

* The contact form is never sent unless you turn on "Send my contact form once during each site test". It is off by default.
* It is only available after your site is verified, and Persqo refuses it for any site that is not verified.
* The test fills the form with "Persqo test submission, please ignore" and the reserved address persqo-test@example.com (example.com never reaches a real inbox). Your form still sends its normal notification to your own inbox, so expect one test message per test.
* Forms protected by a CAPTCHA are not sent.
* During a test, every other form or write request to your site is blocked.

== External services ==

This plugin connects to the Persqo service at https://persqo.com, run by Persqo. It is needed to run the site test: the test itself runs on Persqo's servers in a cloud browser.

What is sent, and when:

* When you press "Connect this site": your API key (in the Authorization header) and your site's home URL, to create or find the site in your Persqo account.
* When you press "Connect this site" or "Verify again": your Persqo site id, so Persqo can fetch https://your-site/.well-known/persqo.txt and confirm you own the site.
* When you press "Run site test": your Persqo site id, whether the contact form test is on, and the kind of site if you chose one. Persqo's cloud browser then visits your public site, like a visitor would.
* When you open the settings page after a test, or open a screenshot: the test id, to load the results and screenshots.
* When you press "Create a shareable report link": the test id.
* When you open the settings page after a test: your Persqo site id and the test id, to load the suggested fixes. Persqo reads your public home page to suggest the values. The answer is cached on your site for ten minutes.
* When you press "Apply fix" (and when Autopilot applies one): your Persqo site id, the fix type and a random request id, so Persqo counts the apply against your plan's monthly fixes. No values from your site are sent. Undo sends nothing.
* When you press "Re-test this finding": your Persqo site id, the fix type, the finding id and the pages the fix changed (for a call to action link, its URL). Persqo then reads those public pages (and /llms.txt) once to check the fix. For security headers, test content, form labels, a missing H1 and speed basics, your site first checks its own live pages itself.
* When you open the settings page with a key saved: a request for your Persqo plan and usage (no site data is sent). The answer is cached on your site for five minutes.

AI visibility (GEO):

* Right after "Connect this site" verifies your site, and when you press "Ask AI about my business": your Persqo site id. Persqo reads your public home page and asks one AI engine (ChatGPT, Gemini or Claude, the first one available) three questions about your kind of business. This happens once per site; the answer is kept on Persqo and shown again.
* When you open the GEO tab: your Persqo site id, to load what AI engines said in your GEO scans.
* When you press "Run a GEO scan now": your Persqo site id. Persqo asks the AI engines in your plan about your business.
* When you open the Plan tab or the fixes: a request for your WordPress plan (no site data is sent), cached for ten minutes.

The AI engines are reached by Persqo, never by your site or your visitors: OpenAI (ChatGPT), Perplexity, Google (Gemini) and Anthropic (Claude), through their APIs with web search. Their terms: https://openai.com/policies/terms-of-use , https://www.perplexity.ai/hub/legal/terms-of-service , https://ai.google.dev/gemini-api/terms , https://www.anthropic.com/legal/commercial-terms

Autopilot (only when you turn it on and confirm):

* When you save Autopilot on, pause, resume or turn it off: your Persqo site id, the schedule (weekly or daily) and whether it is on, to create, pause or delete the Persqo schedule for your site. Uninstalling deletes it.
* Once a day, while Autopilot is on and not paused (WP-Cron): your Persqo site id, to start the GEO scan your plan includes. Persqo starts it only when it is due (monthly on WP Plus, weekly on WP Pro and Agency); otherwise it answers no, and nothing is charged.
* Once an hour, while Autopilot is on and not paused (WP-Cron): your Persqo site id, to ask whether a new test finished and which safe fixes it found, the test id to read its findings, and, after applying fixes, the same re-test request as "Re-test this finding". If Persqo could not create its schedule, the plugin starts the test itself at the chosen interval with the same request as "Run site test".
* At the start of a cycle that works on a new test, and before the summary email: your Persqo site id, so Persqo counts the cycle and the alert against your plan (Free: one of each a month).
* The summary email goes from your site to your own admin address with wp_mail. Persqo does not send it and never emails your visitors.

Without Autopilot, nothing is sent in the background, and with it, nothing is sent on your visitors' page views. The plugin adds no tracking to your public site. Public changes: the plain text file at /.well-known/persqo.txt and a persqo-verification meta tag on the home page, both with your verification token, and the fixes you apply (meta tags, JSON-LD, /llms.txt, a menu item, a footer link, security headers, form labels, headings and image and script attributes). Two fixes add a small inline script, marked data-persqo-fix: the form labels fallback, and, for at most seven days after you apply the speed fix, a check that reports script errors to your own site (admin-ajax.php, never to Persqo) so the re-test can roll the fix back.

Persqo terms of service: https://persqo.com/terms
Persqo privacy policy: https://persqo.com/privacy

== Installation ==

1. Upload the plugin and activate it.
2. In Persqo, go to Settings, API keys, and create a key with read and write access.
3. In WordPress, open Persqo in the admin menu (also under Settings, Persqo), paste the key and save. The plugin opens this page for you right after activation.
4. Press "Connect this site". The plugin serves your verification token and Persqo verifies the site.
5. Optional: turn on the contact form test and save.
6. Press "Run site test". Results appear on the same page after a few minutes.

You can also set the key in wp-config.php instead of the database:

`define( 'PERSQO_API_KEY', 'your key' );`

== Frequently Asked Questions ==

= Does the test send emails from my site? =

Only if you turn on the contact form test. Then your form sends its normal notification for the one test submission. Otherwise the test never submits anything.

= Verification fails. What can I do? =

Open https://your-site/.well-known/persqo.txt in a browser. It should show only your token, with no redirect. If a security or caching plugin blocks or redirects that address, allow it, or clear the page cache so the persqo-verification meta tag the plugin prints on your home page is visible, then press "Verify again". You can also add a DNS TXT record on your domain with the value persqo-verify= followed by your token.

= Does ChatGPT recommend my business? =

Connect the site and open the GEO tab. The free check asks one AI engine three questions a customer would ask and shows the answers word for word. Paid plans follow all four engines over time.

= An engine shows "temporarily unavailable". Why? =

Persqo could not reach that engine's API (for example a rate limit). It is skipped, nothing is charged for it, and the other engines still answer. Persqo never shows a made up answer.

= Is anything locked inside the plugin? =

No. Every feature is in the plugin's code; your Persqo account's plan decides what Persqo returns, and the plugin shows that.

= Does it work with Yoast SEO, Rank Math, All in One SEO, SEOPress, The SEO Framework or Elementor? =

Yes. The title and description fix writes to the SEO plugin's own fields, and the schema fix writes to SEOPress's or The SEO Framework's organization settings or is left to Yoast SEO, Rank Math and All in One SEO, with a link to the right settings screen. No second tag is ever printed. With an Elementor header, the call to action link goes into the WordPress menu the header's Nav Menu widget shows. Elementor form labels and headings are changed in the page's Elementor data, and Elementor's CSS cache is cleared.

= What does Undo remove? =

Everything the fix added or changed: the tags and headers it sent, the /llms.txt answer, the menu item and the footer button. A title and description saved in an SEO plugin go back to the values they had before. Test content is published again with its original date, and forms and pages are put back from the backup taken before the fix (a form or page you edited since is left as you made it).

= Will the security headers break my site? =

They are the safe ones (nosniff, a referrer policy, framing only by your own site, and a Permissions-Policy that turns off camera, microphone and USB). They are only sent on your public pages, never in WP admin, and a header your server already sends is skipped. A full Content-Security-Policy, which often breaks sites, is never set; you can opt in to one in Report-Only mode.

= Can the speed fix slow my site down or break a script? =

It only fills gaps (images without a loading or decoding setting, the main image, a short list of known safe scripts) and skips what your speed plugin already does. After you apply it, the re-test measures the home page load time again and listens for script errors on the live site. If the page got slower or an error appeared, the fix rolls itself back and the activity log says why.

= What happens on the Free plan when I reach a limit? =

The plugin tells you exactly what you used (for example "3 of 3 one-click fix applies this month") and the date it resets, with a link to the plans. Undo and re-test never count, and nothing fails silently.

= Is my API key safe? =

The key is stored encrypted with a key derived from your site's salts, never printed on the page (only the last four characters), and only sent to persqo.com over HTTPS. Uninstalling the plugin deletes it.

== Screenshots ==

1. The settings page before connecting: API key, the contact form test opt-in, and the three steps.
2. Connected and verified, with the contact form test turned on.
3. Results of a site test: score, site checks, and GEO and SEO checks.
4. One-click fixes with the values Persqo suggests, ready to edit and apply.
5. Applied fixes with Re-test this finding and Undo.
6. Autopilot: what it does, the fix types it may apply, the email summary and the confirmation.
7. The activity log: date, finding, before and after, with Undo.
8. GEO: what AI says about you, per engine, with the exact answers and who is named instead.
9. Plans, from your Persqo account.

== Changelog ==

= 0.4.0 =
* Five new one-click fixes, each with a preview, re-test, Undo, the activity log and Autopilot: safe security headers (HSTS and a Report-Only CSP as opt-ins), test and sample content moved to Draft, form labels in your site's language (Contact Form 7, Elementor Forms, WPForms, Gravity Forms), a missing H1 (block editor, classic, theme title or Elementor heading) and speed basics with an automatic rollback.
* The title, description and schema fixes also write into All in One SEO, SEOPress and The SEO Framework.
* Detects SEO, page builder, theme, form, cache, store and multilingual plugins on your site only, and clears page caches with their own purge after each fix.
* Free has every feature with monthly quantities; when a limit is reached the plugin shows what was used and when it resets.

= 0.3.2 =
* Plan tab: each paid plan has a Choose button (monthly, or yearly at 20% off) that opens the checkout for that plan on persqo.com, once Persqo checkout is open. The tab always asks Persqo for your plan, so a plan you just bought shows right away.

= 0.3.1 =
* Persqo now has its own item in the admin sidebar (Settings, Persqo still works), opens once right after activation, and shows a "Connect your site" notice until a key is saved.
* GEO scans follow your WordPress plan: WP Plus asks ChatGPT and Perplexity monthly; WP Pro and Agency ask all four engines weekly and compare with three competitors. Autopilot starts the scan your plan includes when it is due.

= 0.3.0 =
* GEO tab: what ChatGPT, Perplexity, Gemini and Claude say about your business, the exact answers, sources, competitors named instead, and the trend. Engines that are temporarily unavailable say so.
* Free AI visibility check right after connecting: three customer questions on the first engine available.
* GEO fixes: an FAQ block with FAQPage schema from the questions AI was asked, and llms.txt with your business facts.
* Plan tab with the WordPress plans; what each plan includes comes from your Persqo account.
* Better site type detection for directories and marketplaces that run WooCommerce for memberships.

= 0.2.0 =
* Shows the kind of site Persqo detected and the visitor's goal for it; choose the kind of site yourself if you like.
* On a WooCommerce site, a note says how the site was tested, and points stores to Persqo for WooCommerce.
* One-click fixes with Undo and re-test: title and description, Organization or LocalBusiness schema, llms.txt, viewport, and a call to action link. Yoast SEO, Rank Math and Elementor aware.
* Copy the fix prompt or send it to your developer for every other finding.
* Verification also works through a meta tag when a cache or firewall blocks /.well-known/persqo.txt.
* Autopilot, off by default: scheduled tests, only the fix types you allow, re-test with automatic rollback, an optional email summary, pause, and full clean up on uninstall.
* Activity log of every fix. Uninstall removes all fixes.

= 0.1.0 =
* First release: connect and verify, the lead site test, results with GEO and SEO checks, shareable report links.
