mubseoul/wp-link-sweeper 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mubseoul/wp-link-sweeper

Composer 安装命令:

composer require mubseoul/wp-link-sweeper

包简介

Fast, safe broken link scanner with bulk find/replace and auto-fix rules for WordPress content.

README 文档

README

A fast, safe WordPress plugin that scans your content for broken links and provides powerful tools to fix them efficiently.

Features

Core Functionality

  • Smart Link Scanner: Scans posts, pages, and WooCommerce products for broken links
  • Comprehensive Detection: Finds links in <a href> tags and plain URLs in content
  • Intelligent Checking: Uses HEAD requests first, falls back to GET when needed
  • Status Reporting: Detects 404s, timeouts, DNS errors, SSL issues, and redirects
  • Batch Processing: AJAX-based scanning prevents timeouts on large sites

Link Management

  • Detailed Reporting: View all broken links with status codes, occurrence counts, and affected posts
  • Advanced Filtering: Filter by status, post type, domain, and more
  • Quick Actions: Recheck individual links, ignore false positives
  • Response Metrics: See response times and redirect chains

Bulk Operations

  • Find & Replace: Safely replace URLs across your content
  • Match Types: Contains, equals, starts with, ends with
  • Preview Changes: See exactly what will be modified before applying
  • Undo Support: Revert the last bulk operation if needed
  • Safe Replacement: Protects code blocks from modification

Auto-Fix Rules

  • Pattern Matching: Create rules for automatic URL replacement
  • Wildcard Support: Use * to preserve URL paths (e.g., oldsite.com/*newsite.com/*)
  • Rule Management: Enable/disable rules without deleting them
  • Dry Run: Preview rule application before executing

Performance & Reliability

  • Rate Limiting: Configurable request throttling (be kind to servers)
  • Batch Processing: Processes posts and URLs in manageable chunks
  • WP Cron Support: Schedule automatic scans (hourly, daily, weekly)
  • Progress Tracking: Real-time progress updates during scans
  • Stop Anytime: Safely interrupt long-running scans

Developer-Friendly

  • Clean OOP Structure: PSR-4 autoloading, namespaces
  • Custom DB Tables: Efficient storage with proper indexing
  • Security First: Capability checks, nonces, input sanitization
  • i18n Ready: Translation-ready strings
  • Hooks & Filters: Extensible architecture (coming in v1.1)

Requirements

  • WordPress 6.0 or higher
  • PHP 8.0 or higher
  • MySQL 5.6 or higher

Installation

From ZIP File

  1. Download the plugin ZIP file
  2. Go to WordPress admin � Plugins � Add New � Upload Plugin
  3. Choose the ZIP file and click "Install Now"
  4. Activate the plugin
  5. Navigate to Tools � Link Sweeper

Manual Installation

  1. Upload the wp-link-sweeper folder to /wp-content/plugins/
  2. Activate the plugin through the Plugins menu
  3. Navigate to Tools � Link Sweeper

From Source (Development)

git clone https://github.com/mubseoul/wp-link-sweeper.git
cd wp-link-sweeper
# If using Composer (optional)
composer install

Usage Guide

Running Your First Scan

  1. Go to Tools � Link Sweeper
  2. Click Start New Scan
  3. The scanner will:
    • Extract all URLs from your content
    • Check each URL's availability
    • Report broken links, redirects, and errors

Viewing Broken Links

  1. Click the Broken Links tab
  2. Use filters to narrow results:
    • Status (Broken, OK, Redirects)
    • Post Type
    • Domain
  3. See which posts contain each broken link
  4. Recheck or ignore individual links

Finding & Replacing URLs

  1. Go to the Find & Replace tab
  2. Enter the URL to find (e.g., http://oldsite.com)
  3. Enter the replacement URL (e.g., https://newsite.com)
  4. Select match type and post types
  5. Click Preview Changes to see what will happen
  6. Click Execute Replacement to apply changes
  7. Use Undo if you need to revert

Creating Auto-Fix Rules

  1. Go to the Auto-Fix Rules tab
  2. Add a new rule:
    • Pattern: oldsite.com/*
    • Replacement: newsite.com/*
    • Match Type: Contains
  3. Click Add Rule
  4. Preview or apply rules to broken links

Configuring Settings

  1. Go to the Settings tab
  2. Configure:
    • Post Types: Which content to scan
    • Rate Limit: Requests per second (default: 5)
    • Timeout: How long to wait for responses
    • Normalization: UTM removal, fragment handling
    • Scheduled Scans: Automatic scanning frequency
    • Batch Sizes: Adjust for server performance

Testing Checklist

Basic Functionality

  • Install and activate plugin
  • Access admin page at Tools � Link Sweeper
  • All tabs load without errors
  • Settings save successfully

Scanning

  • Start a new scan
  • Progress bar updates in real-time
  • Scan completes without timeout
  • Stop scan button works
  • Dashboard shows accurate statistics
  • Broken links appear in table
  • Can filter by status, post type, domain
  • Pagination works for large result sets

Link Checking

  • Recheck individual link updates status
  • Ignore link removes from list
  • Status badges display correctly
  • HTTP codes are accurate
  • Response times are recorded
  • Redirects are detected and counted

Find & Replace

  • Preview shows affected posts
  • Preview shows sample changes
  • Execute replacement works
  • Code blocks are protected
  • Undo restores original content
  • Match types work (contains, equals, etc.)

Auto-Fix Rules

  • Can add new rule
  • Can delete rule
  • Can enable/disable rule
  • Preview shows what will change
  • Apply rules replaces URLs correctly
  • Wildcard patterns work

WooCommerce Integration

  • Product post type appears if WooCommerce active
  • Can scan product descriptions
  • Can replace URLs in products

Scheduled Scans

  • Can set cron schedule
  • Next run time displays correctly
  • Scheduled scan executes (wait for schedule or test with WP-CLI)

Performance

  • Large sites (1000+ posts) scan without timeout
  • Batch processing works correctly
  • Rate limiting prevents server overload
  • Database queries are efficient

Security

  • Non-admin users cannot access
  • AJAX requests require nonce
  • SQL injection attempts fail
  • XSS attempts are escaped

Uninstall

  • Can enable "Delete data on uninstall"
  • Deactivate plugin
  • Uninstall plugin
  • Database tables removed (if option enabled)
  • Options removed (if option enabled)

Roadmap

Version 1.1 (Released)

  • Export broken links to CSV

Version 1.2 (Planned)

  • Email notifications for broken links
  • Scan custom fields (Yoast, RankMath)
  • Deeper Elementor/page builder support
  • Hooks and filters for developers
  • Bulk ignore by domain
  • Link status history tracking
  • Multi-language support improvements

Pro Ideas (Not in Free Version)

  • Multi-site network support
  • Advanced scheduling (specific times)
  • Automatic replacement with dry-run logs
  • Integration with Google Search Console
  • Broken image detection
  • External link monitoring service
  • Priority support
  • White-label options

Contributing

Contributions are welcome! Please follow these guidelines:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Coding Standards

  • Follow WordPress Coding Standards
  • Use PHP 8.0+ features where appropriate
  • Write clear, documented code
  • Include PHPDoc blocks for classes and methods

Support

License

GPLv2 or later. See LICENSE file.

Credits

Developed by Mubseoul

Special thanks to:

Changelog

1.1.0 - 2024-02-XX

  • NEW: CSV Export functionality
  • Export broken links to CSV file
  • Respects current filters (status, post type, domain)
  • Includes all link details and affected posts
  • Enhanced data portability for reporting

1.0.0 - 2024-01-XX

  • Initial release
  • Core scanning functionality
  • Find & replace tool
  • Auto-fix rules
  • Scheduled scans
  • WooCommerce support

Note: This plugin performs HTTP requests to external websites. Always respect robots.txt and be mindful of rate limiting.

mubseoul/wp-link-sweeper 适用场景与选型建议

mubseoul/wp-link-sweeper 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 02 月 22 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「plugin」 「wordpress」 「seo」 「maintenance」 「link-checker」 「broken-links」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 mubseoul/wp-link-sweeper 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 mubseoul/wp-link-sweeper 我们能提供哪些服务?
定制开发 / 二次开发

基于 mubseoul/wp-link-sweeper 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 37
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2026-02-22