83% database-toolset

Code Review | Database Toolset

WordPress plugin Database Toolset scored83%from 54 tests.

About plugin

  • Plugin page: database-toolset
  • Plugin version: 1.8.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3.1
  • WordPress version: 6.3.1
  • First release: Jun 14, 2019
  • Latest release: Sep 8, 2023
  • Number of updates: 178
  • Update frequency: every 8.7 days
  • Top authors: neoslab (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

700+ active /17,945 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.13MB] [CPU: ▼13.19ms] Passed 4 tests

Server-side resources used by Database Toolset
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1334.20 ▼4.77
Dashboard /wp-admin3.45 ▲0.1042.90 ▼19.58
Posts /wp-admin/edit.php3.56 ▲0.2051.58 ▲1.75
Add New Post /wp-admin/post-new.php6.03 ▲0.1480.18 ▼30.16
Media Library /wp-admin/upload.php3.37 ▲0.1436.63 ▲3.40
Backups /wp-admin/admin.php?page=database-toolset-table3.3833.72
Clean-Up /wp-admin/admin.php?page=database-toolset-cleanup3.4236.40
Tasks /wp-admin/admin.php?page=database-toolset-schedule3.3932.64
Optimizer /wp-admin/admin.php?page=database-toolset-optimize3.3743.42
Performance /wp-admin/admin.php?page=database-toolset-speedup3.3533.03

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 39 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
_database_toolset
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Database Toolset
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲9313.13 ▼1.261.52 ▼0.1640.83 ▼0.40
Dashboard /wp-admin2,245 ▲575.85 ▼0.20110.12 ▲11.7142.41 ▼0.29
Posts /wp-admin/edit.php2,128 ▲392.04 ▼0.0140.44 ▼3.2234.97 ▼2.49
Add New Post /wp-admin/post-new.php1,578 ▲5018.15 ▼0.14644.65 ▼33.5282.04 ▲24.01
Media Library /wp-admin/upload.php1,427 ▲364.16 ▼0.1594.35 ▼1.9341.97 ▲0.16
Backups /wp-admin/admin.php?page=database-toolset-table1,1272.2760.7679.12
Clean-Up /wp-admin/admin.php?page=database-toolset-cleanup1,1591.9036.8641.39
Tasks /wp-admin/admin.php?page=database-toolset-schedule1,0541.9835.3444.62
Optimizer /wp-admin/admin.php?page=database-toolset-optimize9671.9735.4441.60
Performance /wp-admin/admin.php?page=database-toolset-speedup9031.9634.6243.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

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)
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
Please fix the following items
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/database-toolset/admin/partials/database-toolset-admin-speedup.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/database-toolset/admin/partials/database-toolset-admin-table.php:7
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/database-toolset/admin/partials/database-toolset-admin-cleanup.php:103
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/database-toolset/admin/partials/database-toolset-admin-schedule.php:22
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/database-toolset/admin/partials/database-toolset-admin-optimize.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (Main "cleanup" page where all redundant can be removed.), #2 (The "optimize" page can be used to optmize your SQL database using PHPMyAdmin build-in function.), #3 (From the "task" page you will be allowed to create a cron task in order to backup your database based on your requirements.), #4 (The "backups" page will present to you using a table all available backups ready to download.)
  • Tags: You are using too many tags: 23 tag instead of maximum 10
Please take inspiration from this readme.txt

database-toolset/database-toolset.php 92% from 13 tests

The main file in "Database Toolset" v. 1.8.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 151 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected2,579 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP152204871,605
CSS411844738
JavaScript340236

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity20.57
▷ Minimum class complexity1.00
▷ Maximum class complexity86.00
Average method complexity3.91
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods47
▷ Static methods24.26%
▷ Public methods4085.11%
▷ Protected methods36.38%
▷ Private methods48.51%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
4 PNG files occupy 0.25MB with 0.14MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png54.17KB24.16KB▼ 55.41%
screenshot-3.png59.96KB27.69KB▼ 53.81%
screenshot-1.png61.03KB25.13KB▼ 58.82%
screenshot-4.png79.00KB33.44KB▼ 57.67%