=== DecaCrew ===
Contributors: totaliweb
Tags: ai, agents, maintenance, security, seo
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 8.0
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Ten agents watch over your site and propose every fix for your approval. Nothing changes on its own, and almost everything can be undone.

== Description ==

Keeping a WordPress site healthy is a hundred small jobs nobody has time for. Broken links pile up. Images ship without alt text. Drafts are forgotten, plugins go stale, the database fills with things no one needs. You only notice once something is already wrong.

DecaCrew is a crew of ten agents that watch those hundred small things for you.

What makes it different is what it does when it finds something: **nothing, until you say so.** Every issue becomes a proposal that explains what it found, why it matters, and exactly what would change. You approve it or you don't. And almost everything DecaCrew applies can be undone with one click.

= Meet the crew =

Each agent has one job and stays out of the way of the others.

* **Site Guardian** — watches technical health: PHP errors grouped into readable patterns, updates ranked by what actually matters, expiring SSL, an ageing PHP version, a site that went quiet when it shouldn't have.
* **Bodyguard** — watches security: core files that no longer match WordPress' own, plugins that have been abandoned or have known vulnerabilities, login attacks, risky settings.
* **Housekeeper** — keeps the database lean: old revisions, expired temporary data, heavy settings slowing every page load, tables left behind by plugins you removed. Before anything is removed you see a preview, and an export of the affected rows is written to your uploads folder first.
* **Content Pilot** — finds content that has aged: posts nobody has touched in years, drafts abandoned halfway, missing excerpts, articles competing with each other for the same topic.
* **SEO Scout** — audits your pages: broken links, pages nothing links to, and — alongside Yoast, Rank Math, AIOSEO or SEOPress — missing titles and descriptions, written straight into whichever of them you use. Switch on 404 tracking and it will also suggest redirects for visitors landing on pages that no longer exist.
* **Media Curator** — tidies your media library: images without alt text, files far larger than they need to be, duplicates, and files nothing on the site uses any more. Unused files are quarantined for thirty days before anything permanent happens.
* **Order Watch** — for shops: orders stuck mid-checkout, a payment gateway quietly failing, an unusual run of refunds, orders worth a second look.
* **Product Keeper** — for shops: half-finished product pages, stock about to run out based on how fast it actually sells, prices that contradict each other.
* **Support Concierge** — collects messages from your contact forms into one inbox, sorts the urgent from the routine, and drafts replies for you to review.
* **Insight Analyst** — a weekly written summary of how your site is doing, explaining what changed and why rather than handing you a wall of numbers.

Order Watch and Product Keeper stay asleep until WooCommerce is installed. Everything else works on any site.

= You are always the one deciding =

* **Changes are proposed, never applied.** Each proposal states its reason and shows what would change before you accept it. One job runs on its own — Housekeeper's daily clear-out of temporary data WordPress has already marked as expired — and you can switch that off in its settings.
* **Undo is built in.** DecaCrew records how to reverse a change before making it, so one click in the activity log puts things back.
* **"No" means no.** Reject a proposal and the same suggestion stays away for a month, instead of reappearing at the next scan.
* **Nothing is applied to something that moved.** If you edited the page after the proposal was written, DecaCrew refuses to apply it and tells you why.
* **Irreversible actions ask twice.** Sending an email or deleting files permanently requires an explicit confirmation.

= AI is optional, and off =

Every agent works completely without AI. All the detection runs on your own site and finds exactly the same issues either way — AI only improves how a suggestion is worded, plus two extras it can draft for you: a refreshed version of an outdated post, and a description for a product that has none.

If you want that, connect your own account: OpenAI, Anthropic, Google, or any compatible service, including one you run yourself. AI stays off until you switch it on and choose a provider. When it is on, only the text a task actually needs is sent — with recognisable personal details such as email addresses, phone numbers, card and bank numbers and IP addresses stripped out first — and **Settings → AI provider** shows you the log of exactly what was sent, entry by entry.

= Quiet by design =

* **Nothing loads for your visitors.** DecaCrew adds no scripts or styles to your public site.
* **One email at most.** Everything worth knowing arrives in a single daily or weekly summary — never a message per event. You can turn it off.
* **No nagging.** No dashboard notices, no popups, no interruptions outside DecaCrew's own screens.

== Installation ==

1. Install and activate DecaCrew.
2. A short setup wizard asks how thoroughly you want it to look around and where to send the summary email. You can skip it.
3. The crew starts working in the background. Your first proposals appear under **DecaCrew → Approvals**.

Nothing else is required — no account, no API key, no configuration.

== Frequently Asked Questions ==

= Will it change anything without asking me? =

Anything that touches your content, media, settings or shop is a proposal you approve first, and almost all of them can be undone from the activity log afterwards.

There is one exception, and it is deliberate: Housekeeper clears out temporary data that WordPress itself has already marked as expired, once a day, without asking. It is routine cleaning of data nothing can use any more — and if you would rather it asked, turn it off in Housekeeper's settings.

= Do I need an API key? =

No. DecaCrew is fully functional with no AI account at all. A key only changes how proposals are worded, never what gets found.

= What data leaves my site? =

Out of the box, only requests to WordPress.org itself — the same update, integrity and directory checks WordPress core already makes. Nothing goes to any third party unless you set one up yourself. The External Services section below lists everything.

= Do I need WooCommerce? =

No. Without it, the two shop agents stay dormant and the rest of the crew works normally.

= Will it slow down my site? =

Visitors load nothing extra: DecaCrew adds no scripts or styles to your public pages. Its work happens in the background, in small batches that pause themselves if the server is busy.

= What happens if I uninstall it? =

Your data is kept by default, so you can reinstall without losing anything. If you would rather remove everything, tick the option in **Settings → Advanced** before deleting the plugin.

== External Services ==

DecaCrew works fully without any AI or third-party account. Two kinds of connections exist: WordPress.org's own APIs, used out of the box for update and integrity checks exactly like WordPress core does, and optional third-party services that only ever connect after you explicitly configure them.

= WordPress.org APIs (built in) =
Site Guardian and Bodyguard query `api.wordpress.org` for update changelogs, core file checksums and plugin directory status, and the approved "restore a modified core file" action downloads the pristine copy from `core.svn.wordpress.org` / `downloads.wordpress.org`. These are the same wordpress.org services core itself relies on; no personal data is sent.

= AI providers (bring your own key, opt-in) =
If you configure a provider, the plugin sends the task-specific text fragments needed for the feature you run (for example a post excerpt for alt-text generation) to the provider you chose: OpenAI ([terms](https://openai.com/policies/terms-of-use), [privacy](https://openai.com/policies/privacy-policy)), Anthropic ([terms](https://www.anthropic.com/legal/consumer-terms), [privacy](https://www.anthropic.com/legal/privacy)), Google Gemini ([terms](https://ai.google.dev/gemini-api/terms), [privacy](https://policies.google.com/privacy)), or any OpenAI-compatible endpoint you host (e.g. Ollama — data stays on your infrastructure). No data is sent before you enable AI and choose a provider. Recognisable personal details — email addresses, phone numbers, card and bank numbers, IP addresses — are removed before sending, payloads are capped, and every request is listed with its exact contents under Settings → AI provider.

= Freemius =
Opt-in usage tracking and licensing by Freemius ([privacy](https://freemius.com/privacy/), [terms](https://freemius.com/terms/)). Only active after you explicitly opt in on the activation screen; skipping keeps the plugin 100% functional.

= Vulnerability feed (opt-in) =
Bodyguard can check installed plugins against WPScan ([terms](https://wpscan.com/terms/), [privacy](https://automattic.com/privacy/)) using an API key you register yourself. Nothing is sent until you save a key; only plugin slugs are transmitted — version comparison happens on your site. Without a key, Bodyguard reports abandoned plugins only and says so.

= Link checking (toggleable) =
SEO Scout's external broken-link checker sends HTTP requests to URLs found in your own content, to see which ones still resolve. Only the URL is requested; nothing about your site is sent. It can be disabled in the agent's settings.

= Data stored on your own site =
Two things worth naming explicitly, because they involve personal data even though nothing is transmitted anywhere:

* **Support Concierge** copies form submissions (name, email address, message) from your form plugin into its own inbox table so it can triage them. This is your visitors' data, already on your site; it never leaves it. The plugin registers WordPress' personal-data exporter and eraser, so those submissions are included in the standard export and erase requests.
* **The Pro waitlist** stores the email address you type into the "Go Pro" screen, in a table on your own site, only if you tick the consent box. It is not sent anywhere — there is no remote endpoint. You can remove it at any time by deleting the row, and uninstalling with data removal enabled drops the table.

== Screenshots ==

1. The overview: your site's health at a glance, what deserves attention first, and the whole crew with what each one has found.
2. The approval queue. Every proposal says why it exists and shows exactly what would change — you decide before anything happens.
3. Each agent has its own screen with its findings and settings. Here, Site Guardian on technical health.
4. The activity log: everything the crew has done, with one-click undo on anything reversible.
5. AI is off until you turn it on — and when it is on, the log shows exactly what was sent, entry by entry.
6. The weekly report: what changed on your site and why, written in plain language rather than charts.
7. The capability registry: what each agent is allowed to ask the others, so nothing happens off the record.

== Changelog ==

= 1.0.1 =
* Fixed a serious mistake in the maintenance scan: it could offer to delete WordPress's own scheduled update checks, describing them as leftovers of a removed plugin. Approving that suggestion switched off update checking, security releases included. Those tasks are now protected outright, the scan no longer runs where it cannot see the full picture, and a task must look unused on three separate checks before it is ever suggested.
* If your site already accepted one of those suggestions, updating repairs it: the schedule is put back automatically and the repair is recorded in your activity log. Any of those suggestions still waiting in your approval queue are withdrawn.
* Fixed "Disable XML-RPC", which reported success while leaving the endpoint open. It now genuinely closes it: xmlrpc.php answers 403, pingbacks are refused, and the endpoint is no longer advertised in your pages or headers.
* Fixed SEO title and description changes on sites using All in One SEO, which were written where AIOSEO stopped reading them in version 4. They were saved, reported as applied, and changed nothing. The same bug made the SEO audit see every description as missing.
* DecaCrew no longer offers to update itself in the background — that one belongs on the Plugins screen, where WordPress can do it safely. You are still told an update is waiting.
* The backup taken before anything irreversible is now verified before the deletion proceeds. A backup cut short by a full disk, or missing files it could not read, is reported as a failure instead of being trusted.
* Undoing the removal of a scheduled task now reports honestly when it could not put everything back, rather than always claiming success.
* Updates now finish setting themselves up without anyone having to reactivate the plugin: new permissions are granted, changed scan frequencies take effect, and scans that no longer exist stop running.

= 1.0.0 =
* First release. Ten agents: Site Guardian, Bodyguard, Housekeeper, Content Pilot, SEO Scout, Media Curator, Order Watch, Product Keeper, Support Concierge and Insight Analyst.
* Approval-first throughout: every action is a proposal you approve, the way to reverse it is recorded before it is applied, and one click in the activity log undoes it.
* Declining a proposal keeps it away for thirty days; a proposal whose target changed in the meantime is refused rather than applied.
* Optional AI with your own account (OpenAI, Anthropic, Google, or any compatible endpoint including one you host). Off by default — every agent works fully without it.
* Nothing is loaded for your visitors, and everything worth knowing arrives in a single digest email.
* Translation-ready, right-to-left ready, and compatible with WooCommerce's high-performance order storage.

== Upgrade Notice ==

= 1.0.1 =
Important fix. The maintenance scan could offer to delete WordPress's own update checks; approving it silently switched off update checking, security releases included. Updating protects those tasks and repairs the schedule automatically if your site already accepted the suggestion. Also fixes "Disable XML-RPC", which reported success without closing the endpoint.

= 1.0.0 =
First public release.
