WordPress plugin intelligence profile

Rewrite Rule Testing

Unit test your rewrite rules from the WordPress Admin.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 3.9
Current version0.1.1
WordPress coverageTested up to WordPress 3.9
Minimum stackWP 3.9 · PHP —
Directory statusactive
Last directory update20 May 201412y ago
Active installations300Adoption metric — not a quality score
WordPress.org rating5.0 / 5 from 2 ratings
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records Rewrite Rule Testing version 0.1.1 as active, updated 12y ago and tested up to WordPress 3.9.

Overview

About this plugin

This plugin provides a simple interface for testing your custom rewrite rules.

The purpose of this plugin is to be able to test your own rewrite rules, so

you’re probably most interested in knowing how to do that, right? The plugin

provides a filter, rewrite_testing_tests to add your own tests. That filter

passes an associative array of name => tests. The tests array is an associative

array of URI => expected match. In the outer array, the “name” is arbitrary and

for your own reference. In the inner array, the “URI” is the path you want to

test, and the “expected match” is what WordPress should find as a rewrite

match.

Enough chit-chat, here’s an example:

event=$matches[1]&paged=$matches[2]' ) ); } add_filter( 'rewrite_testing_tests', 'my_rewrite_tests' );

You can see the test_cases() method for a full suite of tests for the “Day

and Name” permalink structure. It’s not necessary to leave these in (in fact,

the above demo would wipe them out), unless you want to make sure that your

custom rewrites aren’t affecting core rewrites. If you aren’t using “Day and

Name” permalinks, you’ll need to adjust the tests to fit your permalink

structure.

Todo

  • Add a debug bar extension which reads a transient; the transient would be

updated whenever rewrite rules are flushed. The debug bar extension would

show pass/fail status and link directly to the settings page.

  • Add tests for other permalink structures?
  • Add a way to run this as part of phpunit
WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • rewrite rules
  • permalinks
  • testing
  • tests
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 3.9

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 3.9.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to3.9
Minimum requirementsWordPress 3.9 · PHP not listed
Update activity20 May 201412y ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.