78% thin-out-revisions

Code Review | Thin Out Revisions

WordPress plugin Thin Out Revisions scored78%from 54 tests.

About plugin

  • Plugin page: thin-out-revisions
  • Plugin version: 1.8.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.2
  • WordPress version: 6.3.1
  • First release: Oct 1, 2012
  • Latest release: May 6, 2015
  • Number of updates: 61
  • Update frequency: every 15.5 days
  • Top authors: blogger323 (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

1,000+ active /36,419 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.21MB] [CPU: ▼2.56ms] Passed 4 tests

An overview of server-side resources used by Thin Out Revisions
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2441.29 ▼3.85
Dashboard /wp-admin3.55 ▲0.2552.56 ▼3.08
Posts /wp-admin/edit.php3.60 ▲0.2553.19 ▼2.92
Add New Post /wp-admin/post-new.php6.07 ▲0.18100.98 ▲4.37
Media Library /wp-admin/upload.php3.41 ▲0.1838.27 ▼0.38
Thin Out Revisions /wp-admin/options-general.php?page=hm_tor_option_page3.3634.38

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Thin Out Revisions
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲1014.20 ▼0.331.59 ▼0.1441.67 ▼1.89
Dashboard /wp-admin2,202 ▲275.64 ▲0.0386.80 ▼36.6338.05 ▼9.34
Posts /wp-admin/edit.php2,110 ▲72.00 ▲0.0240.69 ▼5.8334.03 ▼4.88
Add New Post /wp-admin/post-new.php6,240 ▲4,71425.92 ▲2.58848.36 ▲171.7759.36 ▲1.76
Media Library /wp-admin/upload.php1,401 ▲14.17 ▲0.02101.08 ▼5.3845.25 ▲0.49
Thin Out Revisions /wp-admin/options-general.php?page=hm_tor_option_page9261.7723.9233.34

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=hm_tor_option_page
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=hm_tor_option_page
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/thin-out-revisions/thin-out-revisions.php on line 15
    • > PHP Warning
      require(ABSPATHWPINC/class-simplepie.php): failed to open stream: No such file or directory in wp-content/plugins/thin-out-revisions/thin-out-revisions.php on line 15
    • > PHP Fatal error
      require(): Failed opening required 'ABSPATHWPINC/class-simplepie.php' (include_path='.:/usr/share/php') in wp-content/plugins/thin-out-revisions/thin-out-revisions.php on line 15
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/thin-out-revisions/thin-out-revisions.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === thin-out-revisions === )
You can take inspiration from this readme.txt

thin-out-revisions/thin-out-revisions.php Passed 13 tests

The main PHP file in "Thin Out Revisions" ver. 1.8.3 adds more information about the plugin and also serves as the entry point for this plugin
77 characters long description:
A plugin for better revision management. Enables flexible management for you.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected1,199 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP216467737
JavaScript16259231
PO File294163231

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity64.50
▷ Minimum class complexity53.00
▷ Maximum class complexity76.00
Average method complexity4.34
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods38
▷ Static methods615.79%
▷ Public methods38100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants00.00%
▷ Class constants7100.00%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin