84% delete-post-revision

Code Review | Delete Post Revision

WordPress plugin Delete Post Revision scored84%from 54 tests.

About plugin

  • Plugin page: delete-post-revision
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8
  • WordPress version: 6.3.1
  • First release: Feb 24, 2014
  • Latest release: Mar 10, 2014
  • Number of updates: 23
  • Update frequency: every 0.6 days
  • Top authors: eflyjason (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /8,027 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▲1.77ms] Passed 4 tests

A check of server-side resources used by Delete Post Revision
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0457.49 ▲18.82
Dashboard /wp-admin3.32 ▲0.0157.56 ▲5.65
Posts /wp-admin/edit.php3.37 ▲0.0156.57 ▲3.01
Add New Post /wp-admin/post-new.php5.90 ▲0.0195.67 ▼20.41
Media Library /wp-admin/upload.php3.24 ▲0.0159.29 ▲24.16
Delete Post Revision /wp-admin/tools.php?page=delete-post-revision-main3.2139.50

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 8 new options
New WordPress options
delete_post_revision_getPosts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
delete_post_revision_no
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Delete Post Revision
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.26 ▼0.072.58 ▲1.0342.94 ▼2.13
Dashboard /wp-admin2,202 ▲255.62 ▼0.0285.95 ▼9.6143.07 ▼3.97
Posts /wp-admin/edit.php2,104 ▲12.10 ▲0.0837.11 ▼4.2036.40 ▼13.08
Add New Post /wp-admin/post-new.php1,529 ▲123.33 ▲0.38697.54 ▲64.4457.81 ▲2.45
Media Library /wp-admin/upload.php1,404 ▲44.09 ▼0.04111.32 ▲7.0747.65 ▼0.64
Delete Post Revision /wp-admin/tools.php?page=delete-post-revision-main7842.0026.4529.27

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • delete_post_revision_getPosts
    • theysaidso_admin_options
    • db_upgraded
    • delete_post_revision_no

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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/delete-post-revision/delete-post-revision.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: revision, clean up, database, post

delete-post-revision/delete-post-revision.php Passed 13 tests

"Delete Post Revision" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
83 characters long description:
Help you clean out redundant & repetitive post revisions and thin out the database.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin166 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP12025100
PO File2284666

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin