84% rvg-optimize-database

Code Review | Optimize Database after Deleting Revisions

WordPress plugin Optimize Database after Deleting Revisions scored 84% from 54 tests.

About plugin

  • Plugin page: rvg-optimize-data...
  • Plugin version: 5.0.110
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-5.9
  • WordPress version: 5.9.2
  • First release: Nov 23, 2011
  • Latest release: Feb 18, 2022
  • Number of updates: 213
  • Update frequency: every 17.8 days
  • Top authors: cageehv (100%)

Code review

54 tests

User reviews

174 reviews

Install metrics

100,000+ active / 3,540,551 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
Installer ran successfully

Server metrics [RAM: ▲0.41MB] [CPU: ▼294.14ms] Passed 4 tests

A check of server-side resources used by Optimize Database after Deleting Revisions
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.4656.43 ▼15.26
Dashboard /wp-admin3.81 ▲0.4136.19 ▲0.12
Posts /wp-admin/edit.php4.04 ▲0.4042.42 ▲2.09
Add New Post /wp-admin/post-new.php7.34 ▲0.3799.73 ▼1,163.52
Media Library /wp-admin/upload.php3.75 ▲0.4627.06 ▲3.07
Optimize Database /wp-admin/tools.php?page=rvg-optimize-database3.6742.50
Optimize Database /wp-admin/options-general.php?page=odb_settings_page3.8026.38

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 42 new files
Database: 1 new table, 2 new options
New tables
wp_odb_logs
New WordPress options
odb_rvg_excluded_tabs
odb_rvg_options

Browser metrics Passed 4 tests

An overview of browser requirements for Optimize Database after Deleting Revisions
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,773 ▲5116.01 ▲0.719.09 ▲2.072.59 ▲0.15
Dashboard /wp-admin2,902 ▲416.09 ▼0.14137.41 ▼4.62168.03 ▼0.24
Posts /wp-admin/edit.php2,698 ▲43.24 ▲0.0167.68 ▲4.45154.88 ▼2.67
Add New Post /wp-admin/post-new.php1,779 ▲11120.98 ▲2.23475.64 ▲49.96185.03 ▼29.76
Media Library /wp-admin/upload.php1,702 ▲75.54 ▲0.05189.02 ▲47.18190.02 ▼76.57
Optimize Database /wp-admin/tools.php?page=rvg-optimize-database1,2872.4058.07159.99
Optimize Database /wp-admin/options-general.php?page=odb_settings_page2,0652.4556.55175.05

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
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+307
    Non-static method OptimizeDatabase::odb_uninstallation_handler() should not be called statically

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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
Almost there! Just fix the following items
  • 2× 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/rvg-optimize-database/rvg-optimize-database.php:99
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/rvg-optimize-database/includes/settings-page.php:155

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 25 tag instead of maximum 10
You can take inspiration from this readme.txt

rvg-optimize-database/rvg-optimize-database.php Passed 13 tests

"Optimize Database after Deleting Revisions" version 5.0.110's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
54 characters long description:
Optimizes the Wordpress Database after Cleaning it out

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected7,420 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PO File142,2462,9874,421
PHP85777102,843
CSS2014156

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 127)
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity59.00
▷ Minimum class complexity4.00
▷ Maximum class complexity267.00
Average method complexity6.27
▷ Minimum method complexity1.00
▷ Maximum method complexity127.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods77
▷ Static methods11.30%
▷ Public methods7597.40%
▷ Protected methods00.00%
▷ Private methods22.60%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/question.png1.29KB0.30KB▼ 76.56%
images/icon.png1.46KB0.61KB▼ 57.81%