=== YoPingMe ===
Contributors: devshield
Tags: uptime, monitoring, dashboard, downtime, status
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.3.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

See your YoPingMe uptime monitors on the WordPress dashboard. Requires a free YoPingMe account.

== Description ==

YoPingMe watches your sites from outside and tells you when they stop
answering. This plugin brings that view into wp-admin: a dashboard widget
listing each of your monitors, whether it is up right now, and its uptime
over the last 24 hours, 7 days and 30 days.

**This plugin is a viewer, not a monitor.** It cannot detect your own site
going down, because a site that is down does not run PHP. The checking is
done by YoPingMe's probes from outside your server; the plugin only shows
you what they found. If you want to be told when your site goes down, set
up alerts in your YoPingMe account.

= What you get =

* A dashboard widget with every monitor's current status and uptime.
* A clear "as of" timestamp, so you always know how fresh the numbers are.
* An optional one-line badge for your front page footer. It is off by default.

= What YoPingMe does =

YoPingMe runs HTTP, keyword, SSL, ping and TCP checks against your
endpoints from probes on three continents, and alerts you by email,
webhook or Slack. The free plan covers 10 monitors at 5-minute intervals.

= Why the data is cached =

The plugin reads your monitors at most once an hour and caches the answer.
The free plan includes a daily budget of API queries, and an hourly read
keeps a busy dashboard well inside it. The widget shows the time of the
last read rather than pretending the numbers are live, and a Refresh link
lets you pull fresh data when you want it.

== External services ==

This plugin connects to the YoPingMe API to fetch your monitors' status.

* **Service:** YoPingMe (https://yoping.me/), API endpoint
  `https://app.yoping.me/api/mcp`.
* **When:** only after you save an API key, and at most once an hour when
  an administrator views the WordPress dashboard or the plugin's settings
  page. No request is made before a key is configured, and the plugin
  schedules nothing in the background.
* **What is sent:** your API key, in an Authorization header, and the name
  of the read-only operation being called (`list_monitors`). No visitor
  data, site content, or personal information is transmitted.
* **What comes back:** your own monitors' names, targets, current status
  and uptime percentages.

Terms of service: https://yoping.me/terms/
Privacy policy: https://yoping.me/privacy/

Saving an API key you generated in your own YoPingMe account is what
authorises the plugin to contact that account. Removing the key on the
settings page stops every request immediately and deletes the cached data.

The optional footer badge, when you switch it on, loads one image:

* **Service:** YoPingMe (https://yoping.me/), badge logo
  `https://yoping.me/badge/yopingme.svg`.
* **When:** only while the badge setting is on, and only on your site's
  front page. Every other page makes no request. The badge is off by
  default, so a site that never turns it on never contacts yoping.me here.
* **What is sent:** whatever any image request sends - your visitor's IP
  address, their browser's user agent, and the address of the page the
  badge is on. No cookies are set, no scripts are loaded, and nothing
  identifies the visitor beyond that.
* **What comes back:** the YoPingMe logo, as an SVG image.

We count these requests to see which sites the badge is running on.
Turning the badge off on the settings page stops them immediately.

== Installation ==

1. Install and activate the plugin.
2. Go to Settings > YoPingMe. A two-step setup takes it from there:
   create or connect your YoPingMe account with an API key, then choose
   whether to watch this site and whether to show the footer badge.
3. Your monitors appear on the WordPress dashboard, and the settings page
   shows this site's own status once it is being watched.

== Frequently Asked Questions ==

= Do I need a YoPingMe account? =

Yes. The plugin displays data from your account and does no monitoring of
its own. A free account works.

= Where do I get an API key? =

On your YoPingMe account page. Create a key with the MCP scope; that scope
is read-only and cannot change anything in your account.

= Why does the widget say "as of" a time instead of showing live data? =

Because it is showing cached data, on purpose. Reading once an hour keeps
the plugin inside the free plan's daily query budget no matter how often
you load the dashboard. Use the Refresh link if you want the current
numbers.

= Will this plugin tell me when my site goes down? =

Not by itself, and no plugin can: when your site is down, WordPress is not
running. Set up email, webhook, or Slack alerts in your YoPingMe account
for that. The plugin is how you see the history afterwards.

= What is the footer badge? =

An optional one-line credit reading "Uptime monitoring YoPingMe", shown
in the footer of your front page only. It is off unless you turn it on, it
is marked `rel="nofollow"`, and nothing in the plugin depends on it. The
YoPingMe name is our logo, loaded as an image from yoping.me - see the
External services section above for exactly what that request involves. If
the image cannot load, the badge falls back to plain text. You can switch
it off at any time on the settings page, or restyle it with the
`.yopingme-badge` class if you would rather keep it and match your theme.

= What happens if my key stops working? =

The widget keeps showing the last data it successfully fetched, with a
notice explaining what went wrong and when the data is from.

== Screenshots ==

1. The dashboard widget: this site's current status and its uptime over the last 24 hours, 7 days and 30 days, with the time the data was read.
2. The settings page once this site is being watched, showing its status alongside the API key and the optional footer badge.
3. The guided setup that connects your YoPingMe account the first time you open the plugin.

== Changelog ==

= 1.3.2 =
* The refresh link's script (dashboard widget) and the test-connection button's script (settings page) are now proper enqueued assets instead of inline `<script>` tags.
* Corrected probe-location wording: the fleet has grown past the original three cities, so the description no longer names a stale, incomplete list.

= 1.3.1 =
* Shorter badge copy: "Uptime monitoring" followed by the YoPingMe logo.
* The badge link opens in a new tab (`target="_blank"` with `rel="noopener"`).

= 1.3.0 =
* The footer badge now reads "Uptime monitoring by YoPingMe" and appears on your front page only, instead of on every page.
* The badge shows the YoPingMe logo, loaded as an image from yoping.me. This is a request from your visitors' browsers to a third party, so the setting says so before you switch it on and the External services section documents it. The badge is still off by default, and still `rel="nofollow"`.
* If the logo cannot load, the badge falls back to plain text.

= 1.2.0 =
* Guided two-step setup: connect your account, then choose the badge and start watching this site.
* The settings page now shows this site's own status and uptime once it is being watched, instead of an Add button that had nothing left to do.
* Clear links to your YoPingMe dashboard from the plugin page.
* Removed the terms checkbox. Saving a key from your own account is the authorisation; the External Services section above is the full disclosure.
* The activation notice about the footer badge is gone. The badge is still off by default and is offered as a labelled step during setup.

= 1.1.1 =
* Test connection always contacts YoPingMe. It could previously report a revoked key as connected by answering from the cache.

= 1.1.0 =
* Accept the YoPingMe terms before the plugin connects; no key is stored and no request is made until you do.
* Add this site to YoPingMe from the settings page, when your account supports it.
* Shorter footer badge, with only the brand name linked.
* Endpoints can be pointed at a staging YoPingMe from wp-config.php.

= 1.0.0 =
* First release: dashboard widget, hourly cached reads, optional footer badge.
