10% wp-db-booster

Code Review | WP DB Booster

WordPress plugin WP DB Booster scored10%from 54 tests.

About plugin

  • Plugin page: wp-db-booster
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.9
  • WordPress version: 6.3.1
  • First release: Jan 28, 2016
  • Latest release: Nov 9, 2017
  • Number of updates: 4
  • Update frequency: every 163.3 days
  • Top authors: WPManiax (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /8,579 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/wp-db-booster/admin/partials/pagination.class.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; pagination has a deprecated constructor

Server metrics [RAM: ▼1.67MB] [CPU: ▼46.76ms] Passed 4 tests

A check of server-side resources used by WP DB Booster
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.32 ▼1.147.25 ▼35.08
Dashboard /wp-admin2.34 ▼0.9710.90 ▼34.07
Posts /wp-admin/edit.php2.34 ▼1.029.08 ▼36.14
Add New Post /wp-admin/post-new.php2.34 ▼3.557.61 ▼81.73
Media Library /wp-admin/upload.php2.34 ▼0.898.86 ▼23.56
Dashboard /wp-admin/admin.php?page=wp-db-booster-dashboard2.348.32
System Status /wp-admin/admin.php?page=wp-db-booster-systemstatus2.348.48
Log /wp-admin/admin.php?page=wp-db-booster-log2.347.30
Statistics /wp-admin/admin.php?page=wp-db-booster-statistics2.347.75
DB Tables /wp-admin/admin.php?page=wp-db-booster-dbtables2.348.43

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 54 new files
Database: 1 new table, 7 new options
New tables
wp_wpdbboost_log
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
wpdbbooster_tables

Browser metrics Passed 4 tests

Checking browser requirements for WP DB Booster
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,945 ▲18814.00 ▼0.384.74 ▲2.8337.96 ▼8.22
Dashboard /wp-admin2,268 ▲825.23 ▲0.16101.22 ▼20.4438.46 ▲2.42
Posts /wp-admin/edit.php2,151 ▲622.32 ▲0.3339.39 ▼1.4237.02 ▲2.03
Add New Post /wp-admin/post-new.php1,568 ▲4023.42 ▲5.01676.39 ▲41.2339.06 ▼17.72
Media Library /wp-admin/upload.php1,447 ▲624.36 ▲0.18102.49 ▲3.6944.19 ▼0.17
Dashboard /wp-admin/admin.php?page=wp-db-booster-dashboard1,6962.0834.9270.48
System Status /wp-admin/admin.php?page=wp-db-booster-systemstatus1,3341.8624.7624.73
Log /wp-admin/admin.php?page=wp-db-booster-log9842.0431.6025.65
Statistics /wp-admin/admin.php?page=wp-db-booster-statistics1,2053.30112.0155.56
DB Tables /wp-admin/admin.php?page=wp-db-booster-dbtables1,4722.1429.3137.73

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
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/wp-db-booster/admin/partials/pagination.class.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; pagination has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • wpdbbooster_tables
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-db-booster-dbtables
    • > Deprecated in wp-content/plugins/wp-db-booster/admin/partials/pagination.class.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; pagination has a deprecated constructor
    • > GET request to /wp-admin/admin.php?page=wp-db-booster-dashboard
    • > Warning in wp-includes/functions.php+6691
    file_get_contents(wp-content/plugins/wp-snow-effect/wp-snow-effect.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=wp-db-booster-dashboard
    • > Notice in wp-content/plugins/wp-db-booster/admin/partials/tabs/dashboard.php+339
    Undefined variable: plugin
    • > GET request to /wp-admin/admin.php?page=wp-db-booster-dashboard
    • > Notice in wp-includes/functions.php+6691
    file_get_contents(): read of 8192 bytes failed with errno=21 Is a directory
    • > GET request to /wp-admin/admin.php?page=wp-db-booster-systemstatus
    • > Notice in wp-content/plugins/wp-db-booster/admin/partials/tabs/systemstatus.php+91
    Undefined variable: stylesheet
    • > GET request to /wp-admin/admin.php?page=wp-db-booster-systemstatus
    • > Notice in wp-content/plugins/wp-db-booster/admin/partials/tabs/systemstatus.php+91
    Undefined variable: theme_root
    • > GET request to /wp-admin/admin.php?page=wp-db-booster-log
    • > Notice in wp-content/plugins/wp-db-booster/admin/partials/tabs/log.php+69
    Undefined property: pagination::$paging
    • > GET request to /wp-admin/admin.php?page=wp-db-booster-log
    • > Notice in wp-content/plugins/wp-db-booster/admin/partials/tabs/log.php+69
    Undefined index:
    • > GET request to /wp-admin/admin.php?page=wp-db-booster-log
    • > Notice in wp-content/plugins/wp-db-booster/admin/partials/tabs/log.php+89
    Undefined index: paging

SRP 0% 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
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-db-booster/admin/partials/tabs/premium.php
    • > /wp-content/plugins/wp-db-booster/public/partials/wp-db-booster-public-display.php
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/wp-db-booster/admin/partials/tabs/systemstatus.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/wp-db-booster/admin/partials/tabs/systemstatus.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-db-booster/admin/partials/tabs/statistics.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-db-booster/admin/partials/tabs/log.php:57
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/wp-db-booster/admin/partials/tabs/dbtables.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/wp-db-booster/admin/partials/tabs/dbtables.php:16
    • > PHP Notice
      Undefined index: _wpnonce in wp-content/plugins/wp-db-booster/admin/partials/tabs/settings.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-db-booster/admin/partials/wp-db-booster-admin-display.php:31
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-db-booster/admin/partials/tabs/dashboard.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-db-booster/admin/partials/tabs/settings.php:15

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-db-booster-dbtables
    • > Network (severe)
    http://cdn.oesmith.co.uk/morris-0.4.3.min.css?ver=1.0.0 - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/admin.php?page=wp-db-booster-dashboard
    • > Network (severe)
    wp-content/plugins/wp-db-booster/admin/img/syncfusion-icons.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 41 tag instead of maximum 10
You can look at the official readme.txt

wp-db-booster/wp-db-booster.php 92% from 13 tests

Analyzing the main PHP file in "WP DB Booster" version 1.0.1
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 247 characters long)

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
No dangerous file extensions were detected4,385 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP213158672,123
SVG100640
CSS310825575
JavaScript710590573
PO File1204251474

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity19.44
▷ Minimum class complexity1.00
▷ Maximum class complexity120.00
Average method complexity3.24
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods74
▷ Static methods34.05%
▷ Public methods6891.89%
▷ Protected methods00.00%
▷ Private methods68.11%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/table.png0.48KB0.49KB0.00%
admin/img/inactive.png0.71KB0.96KB0.00%
admin/img/table-add.png3.27KB0.64KB▼ 80.39%
admin/img/wpdbbooster.png31.29KB9.71KB▼ 68.96%
admin/img/help.png1.14KB1.21KB0.00%