=== SiteWitness ===
Contributors: wpsitewitness
Tags: security, file integrity, malware, monitoring, backdoor
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.9.6
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Know what changed on your site and whether it is an update or an intrusion: continuous file-integrity monitoring with plain-language verdicts.

== Description ==

SiteWitness watches the files of your WordPress site and tells you, in plain language, what changed and whether the change is legitimate, suspicious or malicious.

**How it works**

1. The plugin fingerprints the code files of your site (core, plugins, themes, mu-plugins, uploads) on a schedule you choose, and runs a few checks on the database that attackers commonly abuse (administrator accounts, active plugins, injected code in options and posts).
2. When something differs from the previous run, the SiteWitness service analyses the change and classifies it: a normal update, something worth a look, or malicious code.
3. You get an email, and a page in your SiteWitness dashboard that explains the finding. With the Pro and Max plans every alert can become an **incident** with the checks and steps to bring the site back to normal.

**What you get**

* Every change to your code files, classified as legitimate, suspicious or malicious.
* Silence when nothing changes: no noise, no daily reports.
* A "missed report" alert if your site stops reporting (plugin deactivated, cron stopped, site down).
* Light on your server: only fingerprints are collected, in a few seconds. The analysis runs on SiteWitness servers.
* Teams: share a site with your colleagues or clients, with or without notifications and incidents.

**SiteWitness complements, it does not replace** a firewall, a security scanner or backups.

**An account is required.** The plugin works together with the SiteWitness service: you connect your site to a free SiteWitness account with one click (no keys to copy). A free plan is available; paid plans include more checks a day, more websites, incidents with recovery steps and bigger teams.

== External services ==

This plugin connects to the SiteWitness service (operated by the plugin author) to analyse the changes it finds. Nothing is sent until you press **Connect** and approve the connection in your SiteWitness account.

**What is sent, and when**

* When you connect: the site address, an anonymous installation identifier (a random UUID created by the plugin) and a one-time code. Sent to www.sitewitness.app (sign-in and approval) and connect.sitewitness.app (connection).
* At every scheduled or manual check, and whenever you change the frequency: the site address, the WordPress version, the list of code files with their MD5 fingerprints (paths and hashes, not contents), and the result of the database checks: the usernames and email addresses of administrator and recently created accounts, the active plugins and mu-plugins, a few settings (site and home address, admin email, default role, registration setting) and any code-like patterns found in options, posts or snippets. Sent to the report address given to the plugin when you connect (a sitewitness.app address).
* Only when a file changed and the service asks for it: the changed files themselves, packed into an archive and uploaded to the SiteWitness storage with a single-use signed address. The file `wp-config.php`, salts and passwords are never sent.
* Regularly, to keep the plan in sync: the installation identifier, signed with the site's own secret, to read back the plan and allowance of your account.

**Why:** to detect, classify and explain changes to the site, and to send you alerts.

* Terms of service: https://www.sitewitness.app/terms
* Privacy policy: https://www.sitewitness.app/privacy

You can disconnect at any time from the plugin page; deleting the plugin removes everything it stored on your site. Your data in the SiteWitness account can be deleted from your dashboard.

== Installation ==

1. Install and activate the plugin.
2. Open **SiteWitness** in the admin menu and press **Connect**. Sign in, or create a free account, and approve.
3. Choose how often the site is checked. The first check becomes the baseline; from then on you are told about every change.

== Frequently Asked Questions ==

= Does SiteWitness replace my firewall or my backups? =

No. It sits next to them: its job is to tell you right away what changed on the site and what kind of change it is.

= What leaves my site? =

See "External services" above. In short: file paths and fingerprints, a few database checks (including administrator usernames and emails), and the contents of changed files when the service needs to analyse them. Never `wp-config.php`, salts or passwords.

= Will it slow down my site? =

No. A check collects fingerprints only and takes a few seconds, on a schedule set from your SiteWitness dashboard (once a day by default). Files that did not change since the last run are skipped.

= How do I change how often the site is checked? =

From your SiteWitness dashboard, per website. The plugin asks the service for the schedule and follows it automatically, within about an hour of a change. The settings page shows the frequency in force and your plan's allowance. How many checks a day a plan includes is a rule of the service; when it is used up the plugin skips the checks until the service says it can run again.

= Do I get an email for every update I make? =

That is your choice, per website: only for suspicious and malicious findings (default), or for every scan that finds differences.

= Why did I get a "missed report" email? =

The site did not report when expected. Common causes: the plugin was deactivated, WordPress scheduled tasks (WP-Cron) are not running (they only run when the site gets visits), or the site was unreachable.

= Where is the plugin's privacy text? =

In your WordPress admin, Settings → Privacy → Policy Guide has a SiteWitness section with text you can copy into your privacy policy. The same text ships with the plugin as privacy-policy.html, and "External services" above lists what is sent and when.

= What happens when I delete the plugin? =

The plugin removes its options, its scheduled tasks and its local data. The website stays in your SiteWitness account until you delete it there.

== Screenshots ==

1. The SiteWitness page: connection, status and check frequency.
2. A scan explained: verdict, files analysed and what changed.
3. An incident with the steps to restore the site.

== Changelog ==

= 0.9.6 =
* Code-quality fixes for the WordPress.org directory: classes and constants now carry the plugin prefix. The plugin version is now included in each report, and the plan price, the service ID and the incidents line are no longer shown on the settings page.

= 0.9.5 =
* The check frequency (once a day by default) is now chosen on your SiteWitness dashboard, per website, and the plugin follows it. The settings page shows it, with a link to change it; a light hourly call, without scanning, picks up changes.
* A privacy section for Settings → Privacy → Policy Guide (also shipped as privacy-policy.html).
* The settings page opens at once and refreshes its data from SiteWitness in the background, with a spinner next to "Status".
* A single, optional note on the settings page links to the plans on sitewitness.app (shown on the free plan only).
* Sites that are not connected yet no longer scan on a schedule. The "Advanced: manual webhook" form was removed: connecting from the settings page is the way to set up.
* "Next snapshot" shows when the next check can really run. The frequency reported to the service is the one the site really keeps (a higher choice than the plan includes counts as daily).
* The settings page script is now a local file; uninstall removes everything the plugin stored; code-quality fixes for the WordPress.org directory.

= 0.9.4 =
* Reports now carry the chosen check frequency, so the service can tell when the next report is due and warn you if it never arrives.
* Changing the frequency sends a report right away.

= 0.9.3 =
* Production endpoints on the sitewitness.app domain.

= 0.9.0 =
* "Connect" flow: sign in on the portal and approve, no keys to copy.

== Upgrade Notice ==

= 0.9.5 =
Any check frequency can be chosen, and the plugin cleans up after itself on uninstall.
