=== Revenue Protection Monitor ===
Contributors: eternity_polska
Tags: woocommerce, monitoring, seo, backup
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 0.34.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Evidence-led monitoring for WooCommerce, technical SEO and local backup.

== Description ==

Revenue Protection Monitor brings three related areas into one WordPress administration screen. Unlike a standalone SEO plugin it focuses on changes and technical evidence rather than editing your SEO settings. Unlike a backup-only plugin it also surfaces supported checkout and site incidents. A missing observation is not reported as a healthy site.

* Revenue: view supported incident evidence and recommended next steps. Coverage varies by gateway and configuration; a quiet dashboard does not prove that checkout works.
* SEO: opt in to bounded checks of selected public pages, indexability, canonical and sitemap evidence. The tracked-scope health score is not a Google ranking and is unavailable when required evidence is missing or stale.
* Backup: create bounded encrypted database backups in a configured directory outside the web root. Backups are stored on the same hosting and do not protect against loss of that hosting. Database restore is limited to one RPM-owned SEO table; it is not a full-site or WooCommerce restore. Experimental file capture is disabled by default.
* Reports: an optional weekly summary can be sent through your site's configured WordPress mail system. Mail acceptance is not delivery.

WooCommerce is optional for general technical and SEO features. Background work depends on WordPress cron or a separately configured scheduler. Results are bounded and may be incomplete.

== Installation ==

1. Install the plugin ZIP through Plugins > Add New and activate on an individual site. Network activation is not supported.
2. Open Revenue Protection and review the setup checklist. Configure monitoring and alert recipients as needed.
3. For local database backup, configure RPM_BACKUP_DIRECTORY to a writable directory outside the web root and ensure the host cannot expose it through an alias. Protect WordPress authentication salts: losing them or the stored key ID makes existing backups unreadable.
4. Optional Google and central-service integrations require separate setup and explicit user action or consent. No provider credentials are bundled.
5. Verify cron, backup storage and mail delivery in an appropriate isolated environment before relying on them.

== Frequently Asked Questions ==

= Is a score a Google ranking? =
No. It is a transparent score of the selected, available technical observations, not a ranking or field Core Web Vitals measurement.

= Does this provide off-site disaster recovery? =
No. Backups remain on this hosting. Full-site, file and WooCommerce restore are not available.

= Does the Free version expire? =
No. Local monitoring, critical (P0) email alerts, the optional weekly summary, SEO checks and local database backup work without a time limit or account. There is no automatic trial. Optional paid plans add central features and are enabled only through an explicit account connection.

= Does an alert mean that a payment was lost? =
No. The plugin reports observed evidence and possible risk, not a fabricated loss amount or proof of successful delivery.

== Privacy and external services ==

Local monitoring stores incident, technical SEO, backup metadata and configuration data on the site. Retention and deletion settings are available; archive deletion on uninstall is separately opt-in and defaults to keep. A backup contains database content and must be protected. No card details or full checkout request bodies are intentionally collected by the monitoring feature.

External services are optional and require configuration and user consent or action:

* Google Search Console API: authorizing a read-only property sends an OAuth authorization request to Google and retrieves search analytics for the selected property. Search analytics and tokens are stored encrypted locally. Disconnect removes local data and attempts revocation. Google privacy policy: https://policies.google.com/privacy ; terms: https://policies.google.com/terms
* Google PageSpeed Insights API: an explicit check sends the selected public URL and configured API key to Google; lab data is distinguished from CrUX field data when available. Google privacy policy: https://policies.google.com/privacy ; terms: https://policies.google.com/terms
* SignalNeural or another configured central receiver: only after the central handoff and its disclosure are enabled, minimized incident data and optional heartbeats are sent to the configured receiver. This can include site domain, software versions, incident IDs, counts and risk class. The receiver's own privacy policy and terms must be supplied and approved before a public listing; central delivery is not guaranteed.
* WordPress mail uses the site's configured mail transport. Optional central notification providers such as Postmark and SMSAPI require separate configuration, consent and service terms; no production provider acceptance is claimed.

Administrators should review their own privacy notices and legal obligations. No GDPR, PCI or service-availability certification is claimed.

== Changelog ==

= 0.34.2 =
Fix (also affected 0.28.x to 0.34.0): the Revenue Protection admin menu is now registered early enough; on some WordPress versions it did not appear. Checkout page check now falls back to confirming the page is published and holds the WooCommerce block, with a clear message and fix hint when the server cannot open it. Setup guide can send a test alert email. Further input-handling hardening.

= 0.34.1 =
Fix: the Revenue Protection admin menu and setup guide were registered too late and did not appear in wp-admin; they now load before the menu is built.

= 0.34.0 =
New: 3-step setup guide (detect WooCommerce, alert email, first check). New: active checkout health check every 10 minutes (payment methods, cart and checkout page errors, no orders in 24 hours, failed-order spike) with plain-language fix steps. Overview now says Your store is OK or how many problems may be costing sales.

= 0.33.2 =
Input handling hardening: all request reads are unslashed and sanitized (passwords unslashed only). Contributors updated.

= 0.33.1 =
Package fix: the release ZIP again includes the GPL LICENSE file. Readme corrected (no automatic trial, wording). No behavior changes.

= 0.33.0 =
Revenue at Risk on the overview: confirmed loss (failed orders during checkout/payment problems), a clearly labelled estimate (average hourly sales), or 'not enough data'; plus a Recovery check that verifies customers are paying again after a fix. Read-only, nothing is sent anywhere.

= 0.32.0 =
Backup: every verification now also rehearses a restore of the database archive into throw-away tables (live data untouched, tables dropped), shown in backup history; the latest archive is re-verified weekly; a 128 MiB free-disk guard blocks backups that could fill the disk. Retention, encryption and password-confirmed restore unchanged.

= 0.31.0 =
Alerts: configurable repeat interval for critical (default 15 min) and high (default 60 min, was 6 hours) problems on the Settings screen, with safe bounds. First critical alert is still immediate; recipients, quiet hours, daily digest and escalation unchanged.

= 0.30.2 =
Plugin Check clean: admin markup is now escaped with an allow-list (wp_kses) instead of suppressions, uninstall no longer defines globals, readme Tested up to added. No behavior changes.

= 0.30.1 =
WordPress.org readiness: coding-standards pass (output escaping, translator comments, ordered placeholders, translatable alert names). No behavior changes.

= 0.30.0 =
New: optional Connect account screen with an explicit consent step (sends only your email, site address and plugin version) and an online dashboard at https://signalneural.com/rpm-app/. Paid plan limits now come from signed central entitlements; without a connection the plugin stays on Free. New owner-friendly overview cards: score, checkout, payments, SEO, backup, active incidents and next action.

= 0.29.1 =
The central service address defaults to https://signalneural.com/rpm-api and can be changed in settings or with the rpm_central_default_endpoint filter. Central features stay off and nothing is sent until you enable them and accept the disclosure. Endpoint addresses may now include a simple path prefix.

= 0.29.0 =
License changed to GPLv2 or later (LICENSE file added). The automatic 14-day PRO trial is removed; existing trial data is kept but no longer grants access. Critical (P0) email alerts are sent on the Free plan.

= 0.28.3 =
Fix: central P1 alert offers are rejected at commit when a P0 already owns the incident (P1-1). Test fixtures aligned with 50-SMS catalog and 9 central migrations; isolated lifecycle harness added. Release acceptance remains open.

= 0.28.2 =
Local development defers WooCommerce detector creation until its hooks run; release acceptance remains open.

= 0.28.1 =
Local development defers admin component registration; runtime and release acceptance remain open.

= 0.28.0 =
Local development adds consented pillar telemetry and a separate restore audit table excluded from database backup. The limited restore remains restricted to the RPM SEO table. Independent review and release acceptance remain open.

= 0.27.0 =
Local development includes a three-pillar overview, bounded SEO history, database backup and narrowly scoped restore, optional integrations, incident evidence and reporting. These changes have offline fixture coverage; WordPress runtime, provider, security re-review of later changes and release acceptance remain open.

Earlier development history is preserved in the pre-edit baseline for this draft.
