Rename to ATT Site Healthcheck (private prefix)

Wholesale rename to avoid clashes with generic 'site healthcheck'
plugin names on a target site:

  - Plugin Name:        'Site Healthcheck' → 'ATT Site Healthcheck'
  - Main file:          site-healthcheck.php → att-site-healthcheck.php
  - Plugin folder:      site-healthcheck → att-site-healthcheck
  - Admin menu slug:    site-healthcheck → att-site-healthcheck
  - Settings slug:      site-healthcheck-settings → att-site-healthcheck-settings
  - PHP class prefix:   WPH_ → ATT_HC_
  - Function prefix:    wph_ → att_hc_
  - Option / transient: wph_* → att_hc_*
  - Action/filter:      wph_* → att_hc_*
  - CSS class prefix:   wph- → att-hc-
  - Constants:          WPH_GITEA_* → ATT_HC_GITEA_*
  - Class file names:   class-wph-*.php → class-att-hc-*.php
  - Dev folder:         ~/dev/wp-healthcheck → ~/dev/att-site-healthcheck

Existing in-progress sessions on installs that had the old wph_session
option will not migrate — they were intended for dev use only and the
user has confirmed this is OK for the rename window.

Smoke-tested on testsite: classes load, 14 steps discovered, save/load
round-trip works, admin page renders with new att-hc- CSS classes.

Recovery plugin detection unchanged — that lives in wp-site-recovery
and continues to be detected by Name + Author header.
This commit is contained in:
2026-06-12 11:11:42 +01:00
parent 4e030ae5ee
commit 6dd050ea1d
24 changed files with 365 additions and 365 deletions

View File

@@ -1,7 +1,7 @@
<?php
if (!defined('ABSPATH')) exit;
return new class extends WPH_Step {
return new class extends ATT_HC_Step {
public function id(): string { return 'core'; }
public function title(): string { return 'Step 3 — WordPress Core Update'; }
public function sub_items(): array {
@@ -126,16 +126,16 @@ return new class extends WPH_Step {
/** Direct call to wp.org's version-check endpoint. Cached 1h via transient. */
private function wp_org_core_version(): ?string {
$cached = get_transient('wph_wp_org_core_latest');
$cached = get_transient('att_hc_wp_org_core_latest');
if ($cached !== false) return $cached === '' ? null : (string) $cached;
$resp = wp_remote_get('https://api.wordpress.org/core/version-check/1.7/', ['timeout' => 5]);
if (is_wp_error($resp) || (int) wp_remote_retrieve_response_code($resp) !== 200) {
set_transient('wph_wp_org_core_latest', '', 5 * MINUTE_IN_SECONDS);
set_transient('att_hc_wp_org_core_latest', '', 5 * MINUTE_IN_SECONDS);
return null;
}
$data = json_decode((string) wp_remote_retrieve_body($resp), true);
$latest = isset($data['offers'][0]['version']) ? (string) $data['offers'][0]['version'] : null;
set_transient('wph_wp_org_core_latest', $latest ?: '', HOUR_IN_SECONDS);
set_transient('att_hc_wp_org_core_latest', $latest ?: '', HOUR_IN_SECONDS);
return $latest;
}