84% wp-revisions-control

Code Review | WP Revisions Control

WordPress plugin WP Revisions Control scored84%from 54 tests.

About plugin

  • Plugin page: wp-revisions-control
  • Plugin version: 1.4.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.0
  • WordPress version: 6.3.1
  • First release: Jul 2, 2013
  • Latest release: Jul 1, 2022
  • Number of updates: 34
  • Update frequency: every 96.7 days
  • Top authors: ethitter (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

50,000+ active /180,075 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.99ms] Passed 4 tests

A check of server-side resources used by WP Revisions Control
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.23 ▼5.82
Dashboard /wp-admin3.35 ▲0.0050.23 ▼12.23
Posts /wp-admin/edit.php3.46 ▲0.1146.41 ▼1.96
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.41 ▲0.05
Media Library /wp-admin/upload.php3.27 ▲0.0437.93 ▲3.63

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

WP Revisions Control: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲5414.27 ▲0.071.70 ▲0.0143.63 ▼5.33
Dashboard /wp-admin2,198 ▲185.64 ▼0.0395.19 ▲8.1041.77 ▲0.75
Posts /wp-admin/edit.php2,120 ▲201.96 ▼0.0733.63 ▼6.1736.56 ▼2.28
Add New Post /wp-admin/post-new.php1,699 ▲16222.39 ▲4.07650.06 ▼21.7057.37 ▼6.59
Media Library /wp-admin/upload.php1,400 ▲34.17 ▼0.1299.09 ▼7.2745.06 ▼0.34

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • 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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-revisions-control/inc/class-wp-revisions-control.php:76
    • > PHP Fatal error
      Trait 'WP_Revisions_Control\\Singleton' not found in wp-content/plugins/wp-revisions-control/inc/class-wp-revisions-control.php on line 14
    • > PHP Fatal error
      Trait 'WP_Revisions_Control\\Singleton' not found in wp-content/plugins/wp-revisions-control/inc/class-block-editor.php on line 17
    • > PHP Fatal error
      Trait 'WP_Revisions_Control\\Singleton' not found in wp-content/plugins/wp-revisions-control/inc/class-wp-revisions-control-bulk-actions.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: admin, revisions, revision

wp-revisions-control/wp-revisions-control.php Passed 13 tests

The main PHP file in "WP Revisions Control" ver. 1.4.3 adds more information about the plugin and also serves as the entry point for this plugin
56 characters long description:
Control how many revisions are stored for each post type

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 plugin632 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP7173361629
JavaScript2013

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity20.50
▷ Minimum class complexity2.00
▷ Maximum class complexity48.00
Average method complexity2.95
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces1
Interfaces0
Traits1
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods41
▷ Static methods12.44%
▷ Public methods2970.73%
▷ Protected methods49.76%
▷ Private methods819.51%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin