Skip to content

Architecture - v1.0 - 2026-06-21

metasync — Architecture

Rendered architecture companion to the canonical markdown wiki (docs/codebase-map.md). Diagrams are pre-rendered to inline SVG.

Generated 2026-06-21 codebase-map · rendered companion 2 sections

Diagram

Simple

Pre-rendered to inline SVG — no runtime JavaScript.

Legend

solid=sync request/hook; dashed=async cron/job; cylinder=WP datastore; cloud=external service

WordPress runtime
metasync.php:565
metasync.php::run_metasync

Plugin bootstrap
metasync.php::run_metasync

Hook loader
includes/class-metasync.php::Metasync.__construct

REST/AJAX APIs
public/class-metasync-rest-api.php:293
public/class-metasync-rest-api.php::Metasync_Rest_Api.metasync_register_rest_routes

Frontend SEO/render hooks
includes/class-metasync.php::Metasync.define_public_hooks

WP-Cron jobs
includes/class-metasync.php::Metasync.define_admin_hooks

Heartbeat scheduler
includes/class-metasync-heartbeat-manager.php:1058
includes/class-metasync-heartbeat-manager.php::Metasync_Heartbeat_Manager.maybe_schedule_heartbeat_cron

MCP REST server
wp-mcp-server/class-metasync-mcp-server.php::Metasync_MCP_Server.register_rest_routes

MCP registry
wp-mcp-server/class-mcp-tool-registry.php::MCP_Tool_Registry.execute_tool

WP DB: options, postmeta, custom tables
database/class-db-migrations.php::MetaSync_DBMigration.run_migrations

Search Atlas APIs
includes/class-metasync-heartbeat-manager.php::Metasync_Heartbeat_Manager.execute_heartbeat_cron_check

Legend solid edge = synchronous / main request flow dashed edge = async / queue / retry / control (does NOT block the caller) read edge = a request fetches from a store write edge = a job populates a store terminal / client lane = where a human or CLI enters fallback lane = the overflow / failover path, distinct from primary

Diagram

Detailed

Pre-rendered to inline SVG — no runtime JavaScript.

External providers

WordPress state

Jobs and processors

Ingress surfaces

WordPress runtime

Legend

solid=sync request/hook; dashed=async cron/job; read/write labels=store direction; cloud=external service

WordPress runtime
metasync.php:565
metasync.php::run_metasync

Plugin bootstrap
metasync.php::run_metasync

Hook loader
includes/class-metasync.php::Metasync.__construct

REST/AJAX APIs
public/class-metasync-rest-api.php:293
public/class-metasync-rest-api.php::Metasync_Rest_Api.metasync_register_rest_routes

MCP REST server
wp-mcp-server/class-metasync-mcp-server.php::Metasync_MCP_Server.register_rest_routes

Custom Pages API
custom-pages/class-metasync-custom-pages-api.php::Metasync_Custom_Pages_API.register_routes

Frontend SEO/render hooks
includes/class-metasync.php::Metasync.define_public_hooks

WP-Cron jobs
includes/class-metasync.php::Metasync.define_admin_hooks

Heartbeat scheduler
includes/class-metasync-heartbeat-manager.php:1058
includes/class-metasync-heartbeat-manager.php::Metasync_Heartbeat_Manager.maybe_schedule_heartbeat_cron

OTTO crawl/SEO jobs
otto/otto_pixel.php::metasync_handle_otto_crawl_url_job

Media batch optimizer
media-optimization/class-media-batch-optimizer.php::Metasync_Media_Batch_Optimizer.start_batch

WP DB: options, postmeta, custom tables
database/class-db-migrations.php::MetaSync_DBMigration.run_migrations

Transients/object cache
includes/class-metasync-api-backoff-manager.php::Metasync_API_Backoff_Manager.is_endpoint_in_backoff

Sitemap/cache/media files
metasync.php::metasync_migrate_physical_sitemaps

Search Atlas APIs
includes/class-metasync-heartbeat-manager.php::Metasync_Heartbeat_Manager.execute_heartbeat_cron_check

Bing/Google indexing APIs
google-index/google-index-init.php::google_index_url

Sentry/GA4 telemetry
telemetry/sentry-wordpress-integration.php::MetaSync_Sentry_WordPress.sendToSentry

MCP registry
wp-mcp-server/class-mcp-tool-registry.php::MCP_Tool_Registry.execute_tool

Legend solid edge = synchronous / main request flow dashed edge = async / queue / retry / control (does NOT block the caller) read edge = a request fetches from a store write edge = a job populates a store terminal / client lane = where a human or CLI enters fallback lane = the overflow / failover path, distinct from primary