=== Statance Uptime Monitoring ===
Tags: uptime, monitoring, website monitoring, availability, statance
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect your site to Statance for independent uptime monitoring and view its latest status in WordPress.

== Description ==

Statance checks your public website from outside WordPress, so monitoring continues even if your WordPress installation stops responding.

Connect with your Statance API key to automatically enrol the site's public homepage for HTTP uptime monitoring. If your account already has an HTTP monitor for the same URL, the plugin reuses it without changing its settings.

* Automatically create or reuse an uptime monitor when you connect.
* View the monitor's latest retrieved status and check interval in Settings > Statance Uptime.
* Refresh the status on demand.
* Manage alerts, recipients, history and check settings in Statance.
* Disconnect without deleting your remote monitor or its history.

A Statance account and a publicly reachable website are required. Statance offers free and paid plans; monitor allowances and minimum check intervals depend on your plan. The plugin requests a 60-second interval for new monitors; Statance applies your plan's minimum interval. Existing monitors keep their settings, including paused state.

Connecting does not configure outage notifications. Set up your alert recipients in Statance after connecting.

= External service and privacy =

This plugin uses the Statance monitoring service at https://api.statance.com/v1. No external requests are made on activation or before an administrator explicitly submits the connection form with consent.

When you connect, your API key is sent over HTTPS to validate the account and list its monitors. The site's public homepage URL and site title are sent if a new monitor is needed. When you press Refresh status, the saved key and monitor ID are used to retrieve that monitor's status. Status is not fetched automatically on page views. Statance independently requests your public website to check its availability.

The plugin does not send visitor records, WordPress users, posts or database contents. It does not add public badges, scripts, advertisements or attribution links to your website. Your account API key is encrypted using your WordPress salts and stored in a non-autoloaded option; it is never displayed in the settings page. It is an account-wide credential, so secure access to your WordPress server and database. Changing your WordPress salts requires reconnecting.

Disconnecting removes the locally stored credential and connection. Deleting the plugin removes its local settings across the network on multisite. Deactivation, disconnection and deletion do not stop remote checks, delete remote monitors or cancel a subscription. Manage those in Statance.

Service: https://statance.com/
Terms: https://statance.com/terms
Privacy policy: https://statance.com/privacy

== Installation ==

1. Upload the statance-uptime folder to wp-content/plugins, or upload the plugin ZIP through Plugins > Add New Plugin.
2. Activate Statance Uptime Monitoring.
3. Open Settings > Statance Uptime.
4. Create or sign into a Statance account at https://statance.com and copy your API key from account settings.
5. Paste the key, confirm the connection disclosure, and choose Connect and enable monitoring.
6. Open Statance to configure alert recipients and check that your monitor is active.

On multisite, configure each site's connection individually. Network activation does not enrol every site automatically. Settings require the manage_options capability.

== Frequently Asked Questions ==

= Can it detect downtime when WordPress is broken? =
Yes. Statance performs the checks externally; WordPress does not need to run a scheduled task to keep monitoring active.

= Will I receive alerts immediately? =
Only after you configure the monitor's alert recipients in Statance. The plugin does not create notification channels or change existing alert settings.

= Will reconnecting duplicate my monitor? =
The plugin lists your account's monitors first and reuses an HTTP monitor with the same homepage URL (ignoring a trailing slash). Other monitor types, different protocols, www variants and different paths are treated as different targets. Avoid concurrent enrolment of the same URL from other tools.

= What happens if my site URL changes or I clone the site? =
The settings screen warns you and status refresh is blocked until you disconnect and reconnect. The original monitor remains unchanged. Do not connect staging sites unless they are publicly reachable and you intend to monitor them.

= Can I monitor a private or local development site? =
No. The website must be reachable from Statance's external monitoring infrastructure.

= How do I stop monitoring? =
Pause or delete the monitor in Statance. Disconnecting or removing this plugin only removes its local connection; it does not stop remote checks or cancel billing.

= Why did a connection attempt fail? =
Check the API key, outbound HTTPS access, and your Statance account's monitor allowance. After a timeout, reconnect: the plugin first looks for an existing monitor before creating one.

== Changelog ==

= 1.0.0 =
* Initial release: explicit connection, automatic HTTP monitor enrolment, existing-monitor reuse, status refresh and local disconnection.
