84% rewrite-testing

Code Review | Rewrite Rule Testing

WordPress plugin Rewrite Rule Testing scored 84% from 54 tests.

About plugin

  • Plugin page: rewrite-testing
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-3.9
  • WordPress version: 6.3.1
  • First release: May 20, 2014
  • Latest release: May 20, 2014
  • Number of updates: 3
  • Update frequency: every 4.0 days
  • Top authors: mboynes (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active / 21,947 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.61ms] Passed 4 tests

An overview of server-side resources used by Rewrite Rule Testing
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0743.46 ▲0.35
Dashboard /wp-admin3.37 ▲0.0749.06 ▲0.72
Posts /wp-admin/edit.php3.42 ▲0.0747.83 ▼3.74
Add New Post /wp-admin/post-new.php5.95 ▲0.0786.37 ▼7.75
Media Library /wp-admin/upload.php3.30 ▲0.0736.08 ▲5.18
Rewrite Testing /wp-admin/tools.php?page=rewrite-testing3.3438.31

Server storage [IO: ▲0.04MB] [DB: ▲0.00MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Rewrite Rule Testing
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.35 ▼1.081.61 ▼0.1839.20 ▼2.92
Dashboard /wp-admin2,210 ▲364.83 ▼1.07107.94 ▼9.5436.84 ▼13.97
Posts /wp-admin/edit.php2,093 ▲12.03 ▼0.0338.09 ▼3.8334.39 ▼3.09
Add New Post /wp-admin/post-new.php1,548 ▲1418.35 ▼4.79653.55 ▲8.8360.21 ▼10.40
Media Library /wp-admin/upload.php1,392 ▲14.19 ▼0.0593.60 ▼3.9340.80 ▼2.10
Rewrite Testing /wp-admin/tools.php?page=rewrite-testing2,6042.1434.6048.57

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rewrite-testing/rewrite-testing.php:480

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Donate link: Invalid url: ""
The official readme.txt might help

rewrite-testing/rewrite-testing.php Passed 13 tests

"Rewrite Rule Testing" version 0.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
28 characters long description:
Unit test your rewrite rules

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin346 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15680346

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity38.00
▷ Minimum class complexity38.00
▷ Maximum class complexity38.00
Average method complexity4.08
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected