# Pixellize Site Issue Scanner

**Version:** 0.2  
**Author:** [Pixellize](https://pixellize.com)  
**License:** GPLv2 or later  
**Requires WordPress:** 5.0+  
**Tested up to:** 6.9

Powerful SEO auditor by Pixellize. Crawls your site to fix broken links, missing meta tags, and unoptimized images.

---

## Description

Pixellize Site Issue Scanner is a comprehensive toolkit designed to improve your website's health and search engine performance. By performing deep site audits, it identifies critical issues that impact user experience and search rankings.

---

## Features

### 🔍 Precision SEO Audit
- **Meta Tag Integrity** — Detects missing, short, or excessively long Meta Titles and Descriptions.
- **Heading Hierarchy** — Flags missing H1 tags, multiple H1 tags, and skipped heading levels.
- **Indexation Monitoring** — Identifies pages hidden from search engines via `noindex` tags.
- **Sitemap Verification** — Multi-method check for `sitemap.xml`, `sitemap_index.xml`, and `robots.txt` entries.

### 🔗 Link & Asset Guardian
- **Internal & External Links** — Validates every link on your site, identifying 404 errors and unreachable URLs.
- **Redirect Mapping** — Flags 301/302 redirects to help minimize hops and save crawl budget.
- **Critical Asset Health** — Monitors JavaScript, CSS, and iframes for availability and load errors.
- **External Link Best Practices** — Identifies external links missing `target="_blank"` or security attributes.

### 🖼️ Image Optimization
- **Broken Image Detection** — Finds images that fail to load from your server or external CDNs.
- **Accessibility Check** — Flags missing `alt` attributes critical for screen readers and SEO.
- **Missing Dimensions** — Detects images without `width`/`height` attributes to prevent Layout Shifts (CLS).
- **Oversized Assets** — Highlights images exceeding 250KB that slow down page loads.

### 🚀 Actionable Fixes
- **Integrated Meta Editor** — Edit Meta Titles and Descriptions with real-time character counting. Syncs with Yoast, Rank Math, AIOSEO, and more.
- **Add Alt Text Across All Pages** — Saves alt text to the Media Library and updates every page/post where that image is used. Skips images that already have alt text. Gutenberg-safe via regex (no DOMDocument mangling). Works reliably on localhost via 4-fallback attachment lookup.
- **Bulk Find & Replace** — Safely replace broken URLs across post content, meta fields, and serialized option data.
- **One-Click `target="_blank"`** — Automatically update external links to open in a new tab.
- **Noindex Removal** — Quickly toggle off the `noindex` tag for pages that should be visible to search engines.

### 📊 Intelligent Dashboard
- **Site Health Score** — Bird's-eye view of your website's overall health using `100 - (issues_per_page × 10)` formula.
- **Real-Time Crawling** — Watch the crawler navigate your site asynchronously with pause/resume support.
- **Issue Breakdown** — Categorized reports with "How to Fix" guidance for every error or warning.
- **Recent Reports** — Per-batch history showing date, pages scanned, error count, and health score.
- **CSV Export** — Professional CSV reports of all identified issues.

### ⚙️ Advanced Configuration
- **Post Types** — Restrict crawling to Posts and Pages.
- **Post Statuses** — Choose between Publish, Draft, and Private.
- **Max Pages to Crawl** — Set a crawl limit per scan (blank = unlimited).

---

## Installation

1. Upload the `pixellize-site-issue-scanner` folder to `/wp-content/plugins/`.
2. Activate the plugin through the **Plugins** menu in WordPress.
3. Access the dashboard via the **Site Problems** menu item in the admin sidebar.

---

## Changelog

### 0.2 *(Latest)*
- **UI/UX:** Full flat-design overhaul — 4-card stats grid; redesigned report tables, modals, and drill-down pages.
- **UI/UX:** Toast notifications replace old inline alerts; Recent Reports show date + time.
- **UI/UX:** Pixellize branding footer added to all admin pages.
- **Feature:** Configurable Max Pages to Crawl (default 25; blank = unlimited); Settings page redesigned with Post Types (Posts & Pages) and Post Statuses (Publish, Draft, Private) options.
- **Feature:** Add Alt Text updates all pages/posts where the image is used and skips images that already have alt text.
- **Feature:** Issues count in Report Management shows only errors, matching Dashboard numbers exactly.
- **Fix:** Site Health Score no longer shows 0 — uses correct formula and scanned-page denominator.
- **Fix:** Dashboard Recent Reports now shows correct data and scores for each batch.
- **Fix:** CSV export corruption resolved; nonce verification added.
- **Fix:** Relative internal links no longer cause false 404 reports.

### 0.1
- Initial release with crawler engine, sitemap detection, external link fixer, image dimension resolution, and meta tag editor.

---

## License

This plugin is licensed under the [GPLv2 or later](https://www.gnu.org/licenses/gpl-2.0.html).

---

Made with ♥ by [Pixellize](https://pixellize.com)
