=== Rc2i Content Pruning ===
Contributors: baptisterey
Donate link: https://rc2i.net/
Tags: seo, links, content pruning, google search console, internal links
Requires at least: 5.0
Tested up to: 6.9.1
Requires PHP: 7.4
Stable tag: 1.0.9
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Analyze outbound & internal links, detect orphan pages, find broken links, and identify low-traffic content with Google Search Console. The all-in-one content pruning toolkit for SEO.

== Description ==

**SEO is the most consistent source of traffic for any website.** But over time, every WordPress site accumulates **broken links, orphan pages, and underperforming content** that silently drag down your rankings.

<a href="https://seopilote.fr/addons" target="_blank">**Rc2i Content Pruning**</a> is the all-in-one WordPress plugin to **audit, clean up, and optimize your content for better SEO**. Stop guessing which pages to keep, update, or remove — **let the data decide.**

<a href="https://seopilote.fr/addons" target="_blank">**Documentation & Getting Started**</a> | <a href="https://wordpress.org/support/plugin/rc2i-content-pruning/" target="_blank">**Support**</a> | <a href="https://rc2i.net/" target="_blank">**Website**</a>

## Why Content Pruning? ##

Every page on your site either **helps** or **hurts** your SEO. Content pruning lets you:

★ **Improve crawl budget** — Search engines focus on your best content<br>
★ **Boost rankings** — Removing weak pages strengthens your entire domain<br>
★ **Fix broken links** — Stop losing link juice and frustrating visitors<br>
★ **Strengthen internal linking** — Make sure every important page is discoverable

## Key Features ##

### ➜ Outbound Links Scanner ###

\* **Automatic scan** of all outbound links across your entire site
\* **HTTP status verification** — instantly spot 404, 301, 500 errors
\* **One-click bulk deletion** of broken links
\* **Inline link editing** — change URL, anchor text, target, nofollow
\* **Purge & full rescan** — start fresh anytime
\* **Domain exclusion list** — ignore YouTube, social networks, etc.

### ➜ Internal Links Analysis ###

\* **Complete internal linking map** of your site structure
\* **Detect pages** with zero outgoing internal links
\* **Internal link count** per page for quick overview

### ➜ Incoming Links & Orphan Pages ###

\* **Identify orphan pages** — pages with no internal links pointing to them
\* **Incoming link stats** per page
\* **Visual distribution chart** — see your linking health at a glance

### ➜ Page Traffic — Google Search Console ###

\* **One-click Google connection** — no Google Cloud project needed
\* **Impressions, clicks, CTR, and position** data per page
\* **Search Console keywords** for each page
\* **Find zero-impression pages** — content that Google ignores
\* **Delete & redirect** — remove underperforming pages with automatic 301

### ➜ Additional Tools ###

\* **Article debug** — detailed link analysis of any single article
\* **Bulk comment deletion** — clean up spam in seconds
\* **301 redirect manager** — full control over your redirects

## Google Search Console Integration ##

Connect to Google Search Console in **one click** via secure OAuth 2.0. **No Google Cloud project or API key required** — the plugin handles everything for you in Simple mode.

Advanced users can provide their own credentials if preferred. <a href="https://seopilote.fr/addons" target="_blank">**Learn more in the documentation →**</a>

## Who Is This Plugin For? ##

✔ **Bloggers** who want to clean up old, underperforming posts<br>
✔ **SEO professionals** who need a quick content audit tool<br>
✔ **Agencies** managing multiple WordPress sites<br>
✔ **E-commerce sites** with hundreds of product pages to monitor<br>
✔ **Any WordPress site** that wants better search rankings

== External Services ==

This plugin connects to external services to retrieve traffic and search data for your website. All connections require explicit user consent through OAuth 2.0 authentication.

= OAuth Relay Server =

* **What it is:** A relay server operated by Rc2i (hosted at seopilote.fr) that handles Google OAuth authentication on behalf of the plugin
* **What it's used for:** Securely managing the OAuth 2.0 flow so users don't need to create a Google Cloud project. The relay exchanges authorization codes for access tokens using credentials stored server-side.
* **Data sent:** OAuth authorization code, exchange tokens
* **Data NOT sent:** The relay never receives your Google Search Console data. All API data calls are made directly from your WordPress site to Google.
* **When:** When you click "Connect to Google" in the plugin settings
* **Service URL:** https://seopilote.fr/
* **Privacy Policy:** https://seopilote.fr/politique-confidentialite
* **Terms of Service:** https://rc2i.net/

= Google OAuth 2.0 =

* **What it is:** Google's authentication service
* **What it's used for:** Authenticating users to access Google Search Console API
* **Data sent:** Authorization code, client credentials (Client ID)
* **When:** When you click "Connect to Google" in the plugin settings
* **Privacy Policy:** https://policies.google.com/privacy
* **Terms of Service:** https://policies.google.com/terms

= Google Search Console API =

* **What it is:** Google's API for accessing Search Console data
* **What it's used for:** Retrieving search impressions, clicks, CTR, position data, and keywords for your pages
* **Data sent:** Your website URL, date ranges for data queries
* **When:** When you click "Synchronize traffic data" in the Traffic tab
* **API Documentation:** https://developers.google.com/webmaster-tools
* **Privacy Policy:** https://policies.google.com/privacy
* **Terms of Service:** https://developers.google.com/terms

**Important:** The plugin does not send any data to Google without your explicit consent and authentication. In Advanced mode, you can provide your own Google Cloud credentials instead of using the relay server.

== Installation ==

1. Go to **Plugins > Add New** in your WordPress dashboard
2. Search for **"Rc2i Content Pruning"**
3. Click **Install Now**, then **Activate**
4. A new **"Content Pruning"** menu appears in your admin sidebar
5. Start by scanning your outbound links from the first tab
6. (Optional) Go to **Settings** and click **"Connect to Google"** to enable traffic analysis

For detailed setup instructions, visit the [documentation](https://seopilote.fr/addons).

== Frequently Asked Questions ==

= Does the plugin work without Google connection? =

Yes. The outbound links, internal links, and incoming links features all work without any Google configuration. The Google connection is only required for the "Page Traffic" tab.

= What types of content are scanned? =

The plugin scans all published **posts** and **pages**. Content in meta fields (custom fields) is also analyzed to find links that may be rendered by your theme or page builder.

= How do I exclude certain domains from the scan? =

Go to the **Settings** tab and add domains to the exclusion list (one per line). Common exclusions include youtube.com, facebook.com, twitter.com, linkedin.com, etc.

= Does deleting a page create a redirect? =

Yes. When you delete a page from the "Page Traffic" tab, the plugin automatically moves it to trash and creates a **301 redirect** to a URL of your choice (home page by default). This preserves any existing link equity.

= Does the plugin slow down my site? =

No. The plugin runs **exclusively in the WordPress admin area**. It does not load any scripts, styles, or database queries on the front-end of your site. The only front-end component is the 301 redirect handler, which is extremely lightweight.

= How long does the link scan take? =

It depends on the number of pages and links on your site. The scan runs in batches via AJAX to avoid timeouts. A site with 500 pages typically completes in a few minutes.

= Is my Google data safe? =

Yes. The plugin uses OAuth 2.0 with a secure relay server. Your Google Search Console data is fetched **directly** from your WordPress site to Google — the relay server only handles authentication tokens, never your actual data. See the External Services section for full details.

= Can I use my own Google API credentials? =

Yes. Switch to **Advanced mode** in the Settings tab and enter your own Client ID and Client Secret from a Google Cloud project. This bypasses the relay server entirely.

== Screenshots ==

1. **Outbound Links** — Scan all external links, check HTTP status codes, and bulk-delete broken links
2. **Internal Links** — Visualize your internal linking structure and find pages with no outgoing links
3. **Incoming Links** — Detect orphan pages that receive zero internal links
4. **Page Traffic** — Google Search Console data with impressions, clicks, CTR, and keywords per page
5. **Settings** — Configure domain exclusions and Google Search Console connection

== Changelog ==

= 1.0.9 =
* Improved plugin page description and documentation
* Added more FAQ entries
* Updated screenshots descriptions

= 1.0.8 =
* Simplified Google OAuth flow (no Google Cloud project needed)
* Secure OAuth relay server for credential management
* Removed Google Analytics 4 dependency (Search Console only)
* Improved security: Client Secret stored server-side only

= 1.0.6 =
* Improved 301 redirect management
* Minor bug fixes

= 1.0.5 =
* Added Incoming Links tab
* Orphan page detection
* Page distribution chart

= 1.0.4 =
* Search Console keywords per page

= 1.0.3 =
* Added HTTP status verification
* Bulk deletion of broken links

= 1.0.2 =
* Added internal link scanning
* Interface improvements

= 1.0.1 =
* Added domain exclusion
* Article debug

= 1.0.0 =
* Initial release
* Outbound link scanning
* Google Search Console integration

== Upgrade Notice ==

= 1.0.9 =
Update readme and screenshots

= 1.0.8 =
Major update: Simplified Google connection. No Google Cloud project needed. Improved security.
