84% delete-post-revisions-on-single-click

Code Review | Delete Post Revisions In WordPress

WordPress plugin Delete Post Revisions In WordPress scored84%from 54 tests.

About plugin

  • Plugin page: delete-post-revis...
  • Plugin version: 4.6
  • PHP compatiblity: 5.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-5.6.2
  • WordPress version: 6.3.1
  • First release: May 16, 2014
  • Latest release: Feb 23, 2021
  • Number of updates: 24
  • Update frequency: every 103.2 days
  • Top authors: wapnepal (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /16,649 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼9.49ms] Passed 4 tests

A check of server-side resources used by Delete Post Revisions In WordPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.25 ▼3.34
Dashboard /wp-admin3.31 ▼0.0444.77 ▼10.85
Posts /wp-admin/edit.php3.36 ▲0.0046.92 ▲5.15
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.65 ▼26.21
Media Library /wp-admin/upload.php3.23 ▲0.0034.20 ▲2.44
Delete Post Revisions /wp-admin/options-general.php?page=tppr-settings-admin3.2028.86

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Delete Post Revisions In WordPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.10 ▼0.471.78 ▼0.0248.21 ▲3.00
Dashboard /wp-admin2,199 ▲195.58 ▼0.0284.72 ▼3.5040.19 ▲2.14
Posts /wp-admin/edit.php2,101 ▲12.00 ▲0.0236.30 ▼5.0330.86 ▼4.21
Add New Post /wp-admin/post-new.php1,529 ▼623.07 ▲4.87646.47 ▲28.6047.98 ▼22.61
Media Library /wp-admin/upload.php1,398 ▼24.26 ▲0.1094.73 ▲1.1341.05 ▲1.50
Delete Post Revisions /wp-admin/options-general.php?page=tppr-settings-admin7812.0223.4723.33

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/delete-post-revisions-on-single-click/tp-delete-post-revisions.php:23

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Installation), #2 (Activation), #3 (Process)
You can look at the official readme.txt

delete-post-revisions-on-single-click/tp-delete-post-revisions.php 92% from 13 tests

"Delete Post Revisions In WordPress" version 4.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("delete-post-revisions-on-single-click.php" instead of "tp-delete-post-revisions.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin91 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1131091

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
5 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png6.37KB4.29KB▼ 32.70%
screenshot-5.png8.18KB5.87KB▼ 28.27%
screenshot-3.png8.05KB5.48KB▼ 31.87%
screenshot-1.png7.24KB4.40KB▼ 39.20%
screenshot-2.png2.34KB1.83KB▼ 21.91%