84% revision-strike

Code Review | Revision Strike

WordPress plugin Revision Strike scored84%from 54 tests.

About plugin

  • Plugin page: revision-strike
  • Plugin version: 0.6.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.8.1
  • WordPress version: 6.3.1
  • First release: Aug 10, 2015
  • Latest release: Sep 16, 2017
  • Number of updates: 11
  • Update frequency: every 69.8 days
  • Top authors: stevegrunwell (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,977 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 successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Revision Strike
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0641.84 ▲0.50
Dashboard /wp-admin3.37 ▲0.0750.86 ▲5.50
Posts /wp-admin/edit.php3.49 ▲0.1345.42 ▼0.16
Add New Post /wp-admin/post-new.php5.95 ▲0.0685.17 ▼3.28
Media Library /wp-admin/upload.php3.30 ▲0.0635.83 ▲0.39
Revision Strike /wp-admin/tools.php?page=revision-strike3.2732.05

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Revision Strike
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.47 ▼0.171.69 ▼0.0142.59 ▼5.03
Dashboard /wp-admin2,210 ▲224.85 ▼0.99105.85 ▲1.0442.51 ▲1.95
Posts /wp-admin/edit.php2,093 ▲42.01 ▲0.0037.05 ▲2.1333.70 ▼0.05
Add New Post /wp-admin/post-new.php1,540 ▲723.09 ▼0.10625.77 ▼52.5557.27 ▲1.40
Media Library /wp-admin/upload.php1,395 ▲74.25 ▲0.0896.66 ▼19.2841.27 ▼4.26
Revision Strike /wp-admin/tools.php?page=revision-strike8152.0325.7922.83

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/revision-strike/includes/tools.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/revision-strike/revision-strike.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: revisions, performance, cron, maintenance

revision-strike/revision-strike.php Passed 13 tests

"Revision Strike" version 0.6.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
50 characters long description:
Periodically purge old post revisions via WP Cron.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin399 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP589302348
Markdown124051

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity7.33
▷ Minimum class complexity5.00
▷ Maximum class complexity9.00
Average method complexity1.74
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods1785.00%
▷ Protected methods315.00%
▷ Private methods00.00%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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