peptide-geo-monitor v0.1.0: internal AI-visibility dashboard (#1)

New internal plugin: weekly LLM probes of core peptides (Perplexity sonar + GPT/Gemini-search via OpenRouter/CF gateway) -> custom table -> wp-admin trendline + standings. Provider interface + cost ledger w/ hard $5/mo cap + collector/panel seam (AI-visibility only). v1 = AI-visibility only.

QA: APPROVE-WITH-P2-NOTES — qa-reviews/peptide-geo-monitor/2026-06-13-f488f4a966cbb9e771d3abc20daee3fa49074520.md (P2 follow-ups: ltrim www display bug, PHPCS mandatory, dead cache)

Agent-Session: geomonitor v0.1.0 merge
This commit is contained in:
peptiderepo
2026-06-13 15:34:33 +07:00
committed by GitHub
parent ba58ead521
commit 46fda89e18
39 changed files with 3909 additions and 2 deletions

34
uninstall.php Normal file
View File

@@ -0,0 +1,34 @@
<?php
/**
* Peptide GEO Monitor — full data teardown on uninstall.
*
* Drops the custom pgm_ai_visibility table and deletes every wp_options
* row whose name starts with "pgm_". WP-Cron events are already cleared
* by PGM_Deactivator on deactivation; this runs after that.
*
* @see ARCHITECTURE.md — §Uninstall specification.
* @see class-pgm-deactivator.php — Clears cron on deactivation.
*/
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
exit;
}
global $wpdb;
/* ── 1. Drop the custom table ─────────────────────────────────────── */
$table = $wpdb->prefix . 'pgm_ai_visibility';
// phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
$wpdb->query( "DROP TABLE IF EXISTS {$table}" );
/* ── 2. Delete all pgm_ prefixed options ──────────────────────────── */
// phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery
$wpdb->query(
"DELETE FROM {$wpdb->options} WHERE option_name LIKE 'pgm\_%'"
);
/* ── 3. Clear any remaining scheduled cron events ─────────────────── */
wp_clear_scheduled_hook( 'pgm_weekly_probe' );