78% wp-cleandb

Code Review | WP-CleanDB

WordPress plugin WP-CleanDB scored78%from 54 tests.

About plugin

  • Plugin page: wp-cleandb
  • Plugin version: 1.8.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.3
  • WordPress version: 6.3.1
  • First release: Apr 16, 2015
  • Latest release: Mar 29, 2020
  • Number of updates: 54
  • Update frequency: every 33.5 days
  • Top authors: gerrygooner (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,807 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼10.03ms] Passed 4 tests

This is a short check of server-side resources used by WP-CleanDB
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.27 ▼11.52
Dashboard /wp-admin3.31 ▲0.0144.07 ▼6.17
Posts /wp-admin/edit.php3.36 ▲0.0143.76 ▼5.88
Add New Post /wp-admin/post-new.php5.89 ▲0.0180.97 ▼16.55
Media Library /wp-admin/upload.php3.23 ▲0.0134.28 ▲1.35
WP-CleanDB /wp-admin/tools.php?page=wp-cleandb3.3227.77

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WP-CleanDB
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.74 ▲0.121.58 ▼0.3037.89 ▼3.89
Dashboard /wp-admin2,207 ▲255.83 ▲0.0297.54 ▼5.6637.70 ▼6.67
Posts /wp-admin/edit.php2,093 ▲11.99 ▼0.0733.14 ▼11.1832.04 ▼2.44
Add New Post /wp-admin/post-new.php1,517 ▼223.65 ▲0.33685.54 ▲15.3453.14 ▼3.62
Media Library /wp-admin/upload.php1,392 ▲44.19 ▼0.0596.59 ▼8.9843.67 ▼3.81
WP-CleanDB /wp-admin/tools.php?page=wp-cleandb9762.0726.7429.44

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

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
Please fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=wp-cleandb
    • > 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/tools.php?page=wp-cleandb
    • > 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-cleandb/wp-cleandb.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/wp-cleandb/wp-cleandb-admin.php:606

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (WP-CleanDB settings screen.)
You can take inspiration from this readme.txt

wp-cleandb/wp-cleandb.php Passed 13 tests

"WP-CleanDB" version 1.8.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
45 characters long description:
Cleanup your Wordpress database in one click!

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
Everything looks great! No dangerous files found in this plugin487 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP246547322
PO File315257165

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.10
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%
Functions24
▷ Named functions24100.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
1 compressed PNG file occupies 0.02MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png24.74KB23.43KB▼ 5.29%