68% dboptimizer

Code Review | DBOptimizer

WordPress plugin DBOptimizer scored68%from 54 tests.

About plugin

  • Plugin page: dboptimizer
  • Plugin version: 2.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.0.3
  • WordPress version: 6.3.1
  • First release: Oct 20, 2010
  • Latest release: Jan 28, 2019
  • Number of updates: 10
  • Update frequency: every 302.2 days
  • Top authors: bledileka (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,731 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.95MB] [CPU: ▼37.20ms] Passed 4 tests

Server-side resources used by DBOptimizer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.73 ▼6.25
Dashboard /wp-admin2.99 ▼0.3123.23 ▼28.41
Posts /wp-admin/edit.php3.00 ▼0.3624.14 ▼26.92
Add New Post /wp-admin/post-new.php2.99 ▼2.8926.87 ▼82.63
Media Library /wp-admin/upload.php3.00 ▼0.2423.32 ▼10.82
DBOptimizer /wp-admin/options-general.php?page=DBOptimizer3.0025.03

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for DBOptimizer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.40 ▲0.031.98 ▲0.1844.88 ▼1.59
Dashboard /wp-admin2,196 ▲225.62 ▲0.0199.01 ▲4.7441.58 ▼3.60
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0535.86 ▲0.4032.55 ▼4.87
Add New Post /wp-admin/post-new.php1,538 ▲318.37 ▲0.06663.29 ▼7.3166.40 ▲1.87
Media Library /wp-admin/upload.php1,401 ▲14.29 ▲0.09101.74 ▼4.8642.77 ▼3.89
DBOptimizer /wp-admin/options-general.php?page=DBOptimizer9771.9623.6026.10

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=DBOptimizer
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

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
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant DB_NAME - assumed 'DB_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/dboptimizer/WP_DB-admin.php on line 44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dboptimizer/db_optimizer.php:28
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/dboptimizer/WP_DB-admin.php:60

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (Interface of the DBOptimizer plugin. Simple and easy to use. No ads and no shady code!) image missing
You can look at the official readme.txt

dboptimizer/db_optimizer.php 92% from 13 tests

The entry point to "DBOptimizer" version 2.0.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("dboptimizer.php" instead of "db_optimizer.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin104 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2312104

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png28.47KB17.08KB▼ 40.00%