=== Recto — Internal Linking & Orphan Pages ===
Contributors: eikiyo
Tags: internal-links, seo, orphan-pages, internal-linking, link-building
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.0
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Find orphan pages, get AI-powered internal link suggestions, and push links to WordPress in one click.

== Description ==

**Orphan pages rank poorly.** They have no incoming internal links, so search engines don't know they matter — even when the content is great.

Recto finds every orphan page on your site, surfaces the best linking opportunities across your existing posts, and lets you approve and insert the links with a single click. No manual searching. No copy-pasting anchor text. No editing posts one by one.

**How it works:**

1. Connect your WordPress site to Recto (this plugin handles the handshake)
2. Recto crawls your site and maps every internal link
3. AI analyses your content and suggests the highest-impact links to add — with the exact phrase to use as anchor text
4. You review and approve suggestions in the Recto dashboard
5. Approved links are inserted into your posts automatically via the WordPress REST API

**What you get:**

* Full orphan page audit — every page with zero incoming links, sorted by impact
* AI-generated anchor text — contextually accurate, reads naturally in the source post
* One-click push — Recto writes the link directly into the post, you never touch the editor
* Google Search Console integration — rank data drives prioritisation so you fix the highest-value orphans first
* Audit log — every pushed link is logged with the source post, target page, and anchor phrase

**This plugin is the connector.** The crawl, AI analysis, and dashboard all live at [rectoapp.com](https://rectoapp.com). A free 14-day trial (1 site) is included; full access is a one-time payment per site.

= External Service =

This plugin connects your WordPress site to the Recto service (rectoapp.com) to provide link analysis and insertion features.

**What data is transmitted:**
- Your site URL (to identify the site)
- WordPress Application Password credentials (stored encrypted, used to insert links via the REST API)
- Post titles, slugs, and content (crawled to identify linking opportunities)
- Google Search Console data (if you choose to connect it)

**Recto Terms of Service:** https://rectoapp.com/terms
**Recto Privacy Policy:** https://rectoapp.com/privacy

No data is sold or shared with third parties. Recto stores only what is needed to deliver the service.

== Installation ==

1. In your WordPress admin, go to **Plugins → Add New → Upload Plugin**
2. Upload the `recto.zip` file and click **Install Now**
3. Click **Activate Plugin**
4. Go to **Settings → Recto**
5. Enter your WordPress username and an Application Password, then click **Connect to Recto**
6. You'll be redirected to rectoapp.com to authorise the connection — sign in or create a free account
7. Once authorised, you'll return to wp-admin and see **Connected ✓**
8. Open the Recto dashboard to start your first site crawl

**Generating an Application Password:**
Go to **Users → Profile**, scroll to **Application Passwords**, type `Recto` as the name, and click **Add New**. Copy the generated password and paste it into the plugin settings.

== Frequently Asked Questions ==

= Is Recto free? =

There's a free 14-day trial for one site. After that, full access is a one-time payment per site (no subscription). AppSumo lifetime deals are also available. See [rectoapp.com](https://rectoapp.com) for current pricing.

= How is this different from Link Whisper or Internal Link Juicer? =

Recto focuses on **orphan pages** specifically — pages that have zero incoming links and are therefore invisible to search engines. Instead of auto-inserting links based on keywords, Recto uses AI to find the best contextual linking opportunity for each orphan, shows you exactly what it will do, and waits for your approval before making any change.

= Does it work with the block editor (Gutenberg)? =

Yes. Recto uses the WordPress REST API to read and write post content, which works with both the classic editor and Gutenberg.

= Does it work with page builders (Elementor, Divi, Beaver Builder)? =

It depends on how the page builder stores content. If the builder uses standard WordPress post content (common with Elementor), Recto works fine. Builders that store content outside post_content (some Divi setups) are not supported in v1.

= What happens if I deactivate the plugin? =

Deactivating sends a disconnect notification to Recto. Your site data (crawl results, link suggestions) is kept in Recto — you can reconnect anytime. Deleting the plugin removes all local options and revokes the Application Password.

= Is my WordPress password safe? =

Recto uses WordPress **Application Passwords** — not your main login password. An Application Password is scoped to Recto only; revoking it in your WordPress profile removes Recto's access instantly and has no effect on your other logins.

= Does this plugin slow down my site? =

No. The plugin adds one lightweight admin settings page and one REST endpoint. It has zero front-end footprint — no scripts or styles are loaded for site visitors.

= Can I connect multiple sites? =

Yes. Install the plugin on each site and repeat the connect process. How many sites you can connect depends on your Recto plan.

= What WordPress version is required? =

WordPress 6.0 or later. Application Passwords (used for authentication) were introduced in WordPress 5.6; the plugin falls back gracefully on earlier versions (manual credential entry still works).

= Do I need PHP 8? =

Yes. PHP 8.0 or later is required, which aligns with WordPress's own recommendation for all sites.

== Screenshots ==

1. Your Recto dashboard — orphan pages surfaced and quick wins waiting, ranked by impact since you were last here.
2. One click per link — Recto reuses a phrase you already wrote as the anchor, so your sentence stays exactly as published.
3. Audit log — every pushed link tracked with source page, target page, anchor phrase, and live-verified status.
4. The workbench — every connected site, with orphans found and links verified, in one place.
5. Fix every orphan page once — $39 per site, no subscription, and no AI rewriting your posts.

== Changelog ==

= 1.0.0 =
* Initial release.
* OAuth-style connect flow via Application Passwords.
* Admin settings page (connected / not-connected state).
* REST endpoint GET /wp-json/recto/v1/status for health checks.
* Automatic Application Password generation on activation (WordPress 5.6+).
* Clean uninstall — removes all options and revokes the Application Password.
