84% database-cleaner

Code Review | Database Cleaner: Clean, Optimize & Repair

WordPress plugin Database Cleaner: Clean, Optimize & Repair scored84%from 54 tests.

About plugin

  • Plugin page: database-cleaner
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: Dec 1, 2021
  • Latest release: Nov 29, 2023
  • Number of updates: 193
  • Update frequency: every 3.8 days
  • Top authors: TigrouMeow (100%)

Code review

54 tests

User reviews

85 reviews

Install metrics

7,000+ active /169,925 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.07MB] [CPU: ▼5.55ms] Passed 4 tests

An overview of server-side resources used by Database Cleaner: Clean, Optimize & Repair
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0748.92 ▲4.40
Dashboard /wp-admin3.43 ▲0.0951.48 ▼10.13
Posts /wp-admin/edit.php3.49 ▲0.1352.40 ▲1.71
Add New Post /wp-admin/post-new.php5.95 ▲0.0789.74 ▼18.18
Media Library /wp-admin/upload.php3.30 ▲0.0639.51 ▲5.03
Database Cleaner /wp-admin/admin.php?page=dbclnr_settings3.8272.51
Dashboard /wp-admin/admin.php?page=meowapps-main-menu4.0284.71

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 60 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Database Cleaner: Clean, Optimize & Repair
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,868 ▲10614.25 ▼0.092.19 ▲0.4041.54 ▼1.88
Dashboard /wp-admin2,245 ▲715.63 ▼0.0692.63 ▼8.9942.44 ▼7.09
Posts /wp-admin/edit.php2,153 ▲531.95 ▼0.0740.05 ▲1.5236.86 ▲1.82
Add New Post /wp-admin/post-new.php1,582 ▲4625.09 ▲1.92613.46 ▼35.7266.11 ▲20.99
Media Library /wp-admin/upload.php1,453 ▲594.19 ▼0.0795.33 ▼9.2439.75 ▼2.15
Database Cleaner /wp-admin/admin.php?page=dbclnr_settings1,7678.77362.6659.97
Dashboard /wp-admin/admin.php?page=meowapps-main-menu5,6585.02137.7774.95

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 25× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Meow_DBCLNR_Queries_Core' not found in wp-content/plugins/database-cleaner/classes/queries/comments_unapproved_comments.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Meow_DBCLNR_Queries_Core' not found in wp-content/plugins/database-cleaner/classes/queries/posts_metadata_orphaned_post_meta.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Meow_DBCLNR_Queries_Core' not found in wp-content/plugins/database-cleaner/classes/queries/users_duplicated_user_meta.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Meow_DBCLNR_Queries_Core' not found in wp-content/plugins/database-cleaner/classes/queries/users_orphaned_user_meta.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Meow_DBCLNR_Queries_Core' not found in wp-content/plugins/database-cleaner/classes/queries/posts_metadata_unused_terms.php:3
    • > PHP Warning
      require_once(DBCLNR_PATH/common/helpers.php): failed to open stream: No such file or directory in wp-content/plugins/database-cleaner/classes/init.php on line 43
    • > PHP Fatal error
      Uncaught Error: Class 'Meow_DBCLNR_Queries_Core' not found in wp-content/plugins/database-cleaner/classes/queries/posts_metadata_duplicated_term_meta.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Meow_DBCLNR_Queries_Core' not found in wp-content/plugins/database-cleaner/classes/queries/comments_duplicated_comments_meta.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Meow_DBCLNR_Queries_Core' not found in wp-content/plugins/database-cleaner/classes/queries/comments_deleted_comments.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Meow_DBCLNR_Queries_Core' not found in wp-content/plugins/database-cleaner/classes/queries/comments_orphaned_comments_meta.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes: The official readme.txt might help

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

The main file in "Database Cleaner: Clean, Optimize & Repair" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 246 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin5,592 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PHP426282405,382
JavaScript32135210

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity14.12
▷ Minimum class complexity1.00
▷ Maximum class complexity125.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes40
▷ Abstract classes00.00%
▷ Concrete classes40100.00%
▷ Final classes00.00%
Methods336
▷ Static methods236.85%
▷ Public methods32596.73%
▷ Protected methods92.68%
▷ Private methods20.60%
Functions23
▷ Named functions14.35%
▷ Anonymous functions2295.65%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin