84% easy-clean

Code Review | Bulk Clean

WordPress plugin Bulk Clean scored84%from 54 tests.

About plugin

  • Plugin page: easy-clean
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.2
  • WordPress version: 6.3.1
  • First release: Dec 8, 2018
  • Latest release: Jun 23, 2019
  • Number of updates: 3
  • Update frequency: every 76.7 days
  • Top authors: Mahesh901122 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,077 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.68ms] Passed 4 tests

Analyzing server-side resources used by Bulk Clean
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0832.94 ▼4.98
Dashboard /wp-admin3.38 ▲0.0845.13 ▼6.14
Posts /wp-admin/edit.php3.49 ▲0.1448.34 ▲0.56
Add New Post /wp-admin/post-new.php5.96 ▲0.0887.74 ▼8.17
Media Library /wp-admin/upload.php3.30 ▲0.0835.02 ▲0.71
Bulk Clean /wp-admin/tools.php?page=easy_clean3.2936.60

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Bulk Clean
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.27 ▼0.111.59 ▼0.2941.05 ▼0.15
Dashboard /wp-admin2,199 ▲195.61 ▼0.0489.89 ▼0.4638.05 ▼2.04
Posts /wp-admin/edit.php2,101 ▲12.03 ▲0.0440.02 ▼1.3436.28 ▲0.08
Add New Post /wp-admin/post-new.php1,529 ▲123.21 ▲0.10602.17 ▼100.2254.37 ▲1.10
Media Library /wp-admin/upload.php1,404 ▲104.18 ▼0.0295.22 ▼2.7640.78 ▼0.44
Bulk Clean /wp-admin/tools.php?page=easy_clean1,0132.0540.6535.87

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

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
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      require_once(): Failed opening required 'EASY_CLEAN_DIRclasses/class-easy-clean-page.php' (include_path='.:/usr/share/php') in wp-content/plugins/easy-clean/classes/class-easy-clean.php on line 42
    • > PHP Warning
      Use of undefined constant EASY_CLEAN_DIR - assumed 'EASY_CLEAN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/easy-clean/classes/class-easy-clean.php on line 42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-clean/classes/class-easy-clean-post.php:42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/easy-clean/easy-clean.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-clean/classes/class-easy-clean-page.php:44
    • > PHP Warning
      require_once(EASY_CLEAN_DIRclasses/class-easy-clean-page.php): failed to open stream: No such file or directory in wp-content/plugins/easy-clean/classes/class-easy-clean.php on line 42

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 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add descriptions for screenshots #1, #2, #3 in easy-clean/assets to your readme.txt
The official readme.txt is a good inspiration

easy-clean/easy-clean.php Passed 13 tests

The primary PHP file in "Bulk Clean" version 1.0.0 is used by WordPress to initiate all plugin functionality
90 characters long description:
Bulk clean allow you to delete unwanted posts, pages, custom post etc with a single click.

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
Good job! No executable or dangerous file extensions detected554 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP470151296
JavaScript16063162
CSS118396

PHP code Passed 2 tests

This is a very shot review of 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.26
Average class complexity8.67
▷ Minimum class complexity2.00
▷ Maximum class complexity22.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods15
▷ Static methods320.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
No PNG images were found in this plugin