78% q-cleanup

Code Review | qCleanup

WordPress plugin qCleanup scored78%from 54 tests.

About plugin

  • Plugin page: q-cleanup
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-3.3.1
  • WordPress version: 6.3.1
  • First release: Feb 24, 2012
  • Latest release: Feb 25, 2012
  • Number of updates: 9
  • Update frequency: every 0.6 days
  • Top authors: ognjen.kuljic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,343 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.51ms] Passed 4 tests

This is a short check of server-side resources used by qCleanup
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.83 ▼3.28
Dashboard /wp-admin3.31 ▲0.0149.21 ▲1.99
Posts /wp-admin/edit.php3.37 ▲0.0048.02 ▼4.15
Add New Post /wp-admin/post-new.php5.90 ▲0.0090.12 ▼20.60
Media Library /wp-admin/upload.php3.24 ▲0.0039.26 ▲3.53
Q Cleanup /wp-admin/options-general.php?page=Q_file_cleanup3.2830.07

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

qCleanup: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.34 ▼0.061.82 ▼0.0642.63 ▼2.96
Dashboard /wp-admin2,199 ▲285.57 ▼0.1385.84 ▼7.6443.23 ▲2.40
Posts /wp-admin/edit.php2,101 ▼21.95 ▼0.0636.85 ▼6.3632.43 ▼2.23
Add New Post /wp-admin/post-new.php1,544 ▲1818.23 ▼4.89638.61 ▲29.7679.24 ▲30.93
Media Library /wp-admin/upload.php1,407 ▲44.19 ▲0.00106.70 ▲8.9047.76 ▲6.14
Q Cleanup /wp-admin/options-general.php?page=Q_file_cleanup9071.9925.3827.86

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

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

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
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Q_file_cleanup
    • > Warning in wp-content/plugins/q-cleanup/q-clean-admin.php+296
    Division by zero
    • > GET request to /wp-admin/options-general.php?page=Q_file_cleanup
    • > 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/options-general.php?page=Q_file_cleanup
    • > 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/q-cleanup/q-clean-admin.php:155
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/q-cleanup/q-clean.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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: Screenshot #1 (Screenshot) image required
You can take inspiration from this readme.txt

q-cleanup/q-clean.php 92% from 13 tests

The entry point to "qCleanup" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("q-cleanup.php" instead of "q-clean.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected302 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP29037302

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png21.12KB10.60KB▼ 49.83%
icon.png1.86KB1.70KB▼ 8.50%