# User Guide

## Overview

Phynite Analytics for WordPress automatically syncs your content data to Phynite Analytics for AI-powered insights and recommendations. Once configured, the plugin works in the background with minimal user interaction required.

## Dashboard

Access the plugin settings at **Settings → Phynite Analytics**.

### Connection Status

Shows whether your site is connected to Phynite Analytics:

- **Connected** (green): Your API key is valid and the connection is active
- **Connection failed** (red): Check your API key or network connectivity
- **Not connected** (gray): No API key has been entered

### API Key

Enter and manage your Phynite Analytics API key. Click the eye icon to show/hide the key.

### Sync Controls

- **Sync All Content**: Manually trigger a full sync of all published posts and pages
- **Cancel**: Stop an in-progress sync operation

The progress bar shows real-time sync status including the number of posts processed.

### Detected Plugins

Shows which supported plugins are installed and active:

**SEO Plugins** (one will be used):
- Yoast SEO
- RankMath
- All in One SEO (AIOSEO)

**Recipe Plugins** (one will be used):
- WP Recipe Maker (WPRM)
- Tasty Recipes
- Mediavine Create

### Queue Status

Shows the current state of the sync queues:

- **Pending syncs**: Posts waiting to be synced
- **Failed syncs**: Posts that failed to sync (will be retried automatically)

## Automatic Syncing

The plugin automatically syncs content when:

1. **Publishing a post**: New posts are synced immediately after publishing
2. **Updating a post**: Changes to published posts trigger a sync
3. **Scheduled posts**: Posts are synced when they transition to published status

### What Gets Synced

For each post, the plugin extracts and syncs:

**Core Data**:
- Title, content, excerpt
- URL (permalink)
- Author information
- Publication and modification dates
- Featured image URL
- Categories and tags
- Word count and reading time

**SEO Data** (if SEO plugin detected):
- SEO title and meta description
- Focus keyword
- SEO score and readability score
- Canonical URL
- Robots meta (noindex/nofollow)
- Schema article type

**Recipe Data** (if recipe plugin detected):
- Recipe name and description
- Prep time, cook time, total time
- Servings/yield
- Cuisine and course
- Ingredient count
- Calories
- Rating and review count

**Internal Links**:
- Links to other posts on your site
- Anchor text used
- Link context (surrounding text)

## Background Processing

The plugin uses WordPress cron for background processing to avoid slowing down your site:

- **Sync Queue**: Processes pending syncs in batches of 25 posts
- **Retry Queue**: Automatically retries failed syncs with exponential backoff
- **Health Check**: Validates API connection hourly

## Supported Post Types

By default, the plugin syncs:
- Posts
- Pages
- Recipe post types (from supported recipe plugins)

Developers can add custom post types via the `phynite_supported_post_types` filter.

## Performance Considerations

The plugin is optimized for shared hosting environments:

- **Memory efficient**: Processes posts in small batches
- **Non-blocking**: All syncing happens in the background
- **Debounced**: Rapid edits don't trigger multiple syncs
- **Rate limited**: Respects API rate limits automatically

## Data Privacy

- Only your content metadata is sent to Phynite Analytics
- No visitor/user data is collected or transmitted
- API communication uses HTTPS encryption
- Your API key is stored securely in the WordPress database
