WP Manifestindependent plugin directory
manifest / integrations / tornevall-tools-for-wordpress

Tornevall Tools for WordPress

Tornevall Networks Tools for WordPress

by Tornevall Networks · github.com/tornevall/tornevall-tools-for-wordpress · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/tornevall/tornevall-tools-for-wordpress/archive/refs/heads/main.zip

Readme

Tornevall Tools for WordPress

Tornevall Tools for WordPress brings selected services from Tornevall Networks Tools into WordPress.

The plugin is the WordPress integration layer for Tools. It does not try to recreate Tools inside WordPress; it exposes useful Tools services in a WordPress-native way while keeping service credentials server-side.

Current integrations

Version 0.3.0 contains:

  • Guestbook - central Tools-backed guestbook with explicit per-site guestbook selection, shortcode rendering, owner-scoped reads/writes, moderation and Cloudflare Turnstile support.
  • Dynamic DNS - keep a Tornevall Networks Dynamic DNS hostname synchronized from WordPress manually or through WP-Cron.
  • Statuspage - render a public Tools Status Platform page in WordPress with overall state, component state, active incidents and incident timelines, through either a shortcode or native Gutenberg block.
  • Tools account connection - explicitly authorize this WordPress site from a logged-in Tools account and let Tools create dedicated site credentials for supported services.

AI is not part of the current public runtime. DNSBL/FraudBL is not duplicated in this plugin; the standalone DNSBL plugin remains authoritative for DNSBL behavior.

Statuspage

Tools is authoritative for Status Platform data. WordPress reads the canonical unversioned public endpoint:

GET https://tools.tornevall.net/api/statuspage/{slug}

Configure the public status-page slug under Tornevall Tools -> Statuspage and add the native Tornevall Statuspage block from the Tornevall Tools block category. The block is dynamic/server-rendered: its JavaScript provides the editor experience and settings only, while frontend output uses the same PHP renderer, cache and outage semantics as the shortcode. Opening the editor does not trigger a Status Platform API request merely to preview the block.

The shortcode remains available for compatibility:

[tornevall_statuspage]

Include recent resolved incident history either with the block inspector toggle or with:

[tornevall_statuspage history="1"]

The public response is normalized server-side from the current ToolsAPI payload. Public rendering includes the page title/description, overall status, components, active incidents and update timelines. ToolsAPI first-party endpoints are intentionally not URL-versioned.

Status and cache semantics

The integration deliberately separates a confirmed outage from a failed status request:

  • operational is healthy.
  • degraded, partial_outage and maintenance are warning states.
  • major_outage is the only confirmed critical/major-outage state.
  • missing configuration is neutral.
  • an unknown remote state remains unknown.
  • a failed Tools request uses the last successful snapshot as stale when one exists.
  • a failed Tools request without a previous snapshot is temporarily unavailable, not a major outage.

Successful responses use a bounded live cache (60-3600 seconds, default 300). The most recent successful snapshot is retained separately so a short API/network interruption does not falsely turn the WordPress status display into an outage.

The public Status Platform endpoint does not require a bearer token. No Tools credential is emitted in public HTML or browser JavaScript.

Tools account connection

Open Tornevall Tools in wp-admin and choose Connect to Tornevall Tools. Pairing is always an explicit administrator action.

The flow is:

  1. WordPress asks the public Tools pairing endpoint for a short-lived device code.
  2. The administrator is redirected to https://tools.tornevall.net and signs in there.
  3. Tools shows the WordPress site and the services it wants to use.
  4. The administrator approves or denies the request.
  5. Tools creates dedicated credentials for this WordPress site. Existing raw service tokens are not sent to WordPress and are not reused.
  6. WordPress exchanges the device code server-to-server once and stores the granted site credentials locally.

The wp-admin status card shows which managed services were granted and their permission metadata, but never displays the credentials themselves.

Initial managed services are DNSBL/FraudBL and Guestbook. Manual credentials remain explicit overrides. Dynamic DNS stays manually configured in this pairing version because its current Tools token model maintains one primary user token and should not be silently rotated.

Disconnecting removes the locally stored managed connection and credentials from WordPress.

Guestbook

Tools remains the authoritative Guestbook database.

Public pages use local WordPress Guestbook JavaScript and local REST endpoints. WordPress forwards requests to Tools from PHP so the Tools Guestbook token never needs to enter browser JavaScript or markup.

The default Tools Guestbook API base is:

https://tools.tornevall.net/api/guestbook

A Tools account may own more than one guestbook. After configuring a server-side Guestbook token, or connecting a Tools account that grants Guestbook access, open Tornevall Tools -> Guestbook connection and select the guestbook used by this WordPress installation.

Existing guestbooks can be edited from the same connection page instead of creating a duplicate. Choose Edit on an owned book to change its name, slug, theme, site URL, language, description and active/hosted state. Editing requires both guestbook.write and guestbook.moderate. If the edited book is the one currently selected for the site, WordPress refreshes its stored slug after Tools confirms the update.

The Guestbook token/Turnstile settings and entry moderation page is available under Tornevall Tools -> Tools Guestbook. It is intentionally grouped with the rest of the plugin instead of appearing as a separate item under WordPress core Tools.

Basic shortcode:

[tornevall_guestbook]

Optional presentation attributes:

[tornevall_guestbook theme="miazma" limit="10"]

Supported themes are tools, miazma and terminal. The entry limit is bounded to 1-50.

Public signing is disabled until Cloudflare Turnstile is configured for the WordPress hostname. Each WordPress installation supplies its own Turnstile site key and secret. Turnstile is validated server-side before a visitor entry is forwarded to Tools.

Dynamic DNS

Dynamic DNS is disabled by default.

When enabled, the plugin calls:

POST https://tools.tornevall.net/api/dyndns/update

with a server-side bearer token and:

{
  "hostname": "home.dyn.tornevall.net",
  "address": "auto"
}

Supported WP-Cron schedules are hourly, twice daily and daily. Administrators can also run an immediate update from wp-admin.

External services

Tornevall Networks Tools

Tools is used for Statuspage public reads, account pairing, Guestbook and Dynamic DNS integrations.

Statuspage sends only the configured public slug and normal HTTP metadata. Successful public status responses may be cached locally to provide stale fallback during a temporary API failure.

Authenticated Guestbook, Dynamic DNS and account-pairing credentials remain server-side.

Cloudflare Turnstile

The Guestbook can use Cloudflare Turnstile to protect public signing. Each WordPress installation supplies its own site key and secret; the secret remains server-side.

Requirements

  • WordPress 6.5 or newer
  • PHP 7.4 or newer
  • A public Tools status page for Statuspage rendering
  • A Tornevall Networks Tools account or manual credentials for integrations that require authentication
  • Cloudflare Turnstile credentials if public Guestbook signing is enabled

Architecture

tornevall-tools-for-wordpress.php                         Main bootstrap
includes/class-ttfw-settings.php                          Tools overview / Dynamic DNS settings
includes/class-ttfw-api-client.php                        Shared fixed-origin Tools API client
includes/class-ttfw-tools-connection.php                  Tools account pairing and managed credentials
includes/class-ttfw-tools-connection-admin.php            Tools account status and connect/disconnect controls
includes/class-ttfw-dynamic-dns-module.php                Dynamic DNS logic and WP-Cron
includes/class-ttfw-module-registry.php                   Integration overview metadata
includes/class-ttfw-statuspage-settings.php               Selected public status page and cache settings
includes/class-ttfw-statuspage-api.php                    Canonical unversioned Status Platform public response client/normalizer
includes/class-ttfw-statuspage.php                        Statuspage cache, health semantics, shared renderer, shortcode and block registration
includes/class-ttfw-statuspage-admin.php                  Statuspage setup and diagnostics
blocks/statuspage/block.json                              Statuspage Gutenberg block metadata
blocks/statuspage/index.js                                Statuspage editor UI; no direct Status API calls
includes/class-ttfw-guestbook-api.php                     Tools Guestbook server-side client
includes/class-ttfw-guestbook-settings.php                Guestbook credentials / selected book / Turnstile settings
includes/class-ttfw-guestbook-connection-admin.php        Guestbook catalog, selection, editing and remote creation
includes/class-ttfw-guestbook-rest.php                    Local Guestbook REST proxy
includes/class-ttfw-guestbook.php                         Guestbook shortcode/frontend integration
includes/class-ttfw-guestbook-admin.php                   Owner-scoped Guestbook administration
assets/guestbook.js                                       Local Guestbook frontend client
tests/guestbook-connection-contract-test.php              Guestbook edit/menu wiring regression checks
tests/statuspage-contract-test.php                        Deterministic Statuspage contract regression checks
tests/statuspage-block-test.php                           Deterministic Gutenberg metadata/renderer wiring checks

Verification

The GitHub workflow runs PHP syntax checks on PHP 7.4 and 8.4, focused contract tests, and the official WordPress Plugin Check action.

License

GPL-2.0-or-later.

Read the full README on GitHub →