84% wp-rollback

Code Review | WP Rollback

WordPress plugin WP Rollback scored84%from 54 tests.

About plugin

  • Plugin page: wp-rollback
  • Plugin version: 1.7.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.2
  • WordPress version: 6.3.1
  • First release: May 12, 2015
  • Latest release: Jan 10, 2023
  • Number of updates: 50
  • Update frequency: every 56.1 days
  • Top authors: dlocc (82%)webdevmattcrom (16%)drrobotnik (6%)

Code review

54 tests

User reviews

189 reviews

Install metrics

200,000+ active /1,712,695 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.88ms] Passed 4 tests

Analyzing server-side resources used by WP Rollback
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.50 ▼2.18
Dashboard /wp-admin3.33 ▲0.0250.53 ▼10.25
Posts /wp-admin/edit.php3.44 ▲0.0849.74 ▲0.79
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.31 ▼6.37
Media Library /wp-admin/upload.php3.25 ▲0.0237.73 ▼0.73

Server storage [IO: ▲0.16MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Rollback
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2913.31 ▼0.941.68 ▼0.2541.89 ▼7.88
Dashboard /wp-admin2,221 ▲185.87 ▼0.0697.09 ▼18.1942.71 ▲0.52
Posts /wp-admin/edit.php2,100 ▼02.03 ▼0.0335.26 ▼2.7339.33 ▲1.35
Add New Post /wp-admin/post-new.php1,545 ▲1722.97 ▲5.39671.32 ▲10.4555.62 ▼5.19
Media Library /wp-admin/upload.php1,400 ▼34.15 ▼0.10111.13 ▲7.5948.46 ▼0.23

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/wp-rollback/includes/rollback-menu.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can take inspiration from this readme.txt

wp-rollback/wp-rollback.php Passed 13 tests

The entry point to "WP Rollback" version 1.7.3 is a PHP file that has certain tags in its header comment area
68 characters long description:
Rollback (or forward) any WordPress.org plugin or theme like a boss.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin2,790 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript45033471,576
PHP5257381649
CSS29714533
SVG10132

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity28.67
▷ Minimum class complexity4.00
▷ Maximum class complexity77.00
Average method complexity4.32
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods25
▷ Static methods14.00%
▷ Public methods2080.00%
▷ Protected methods00.00%
▷ Private methods520.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
1 PNG file occupies 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/wprb-logo.png26.60KB16.43KB▼ 38.22%