84% wc-delete-product-images

Code Review | Delete product images for WooCommerce

WordPress plugin Delete product images for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wc-delete-product...
  • Plugin version: 1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0.3
  • WordPress version: 6.3.1
  • First release: Jun 4, 2020
  • Latest release: Oct 26, 2022
  • Number of updates: 5
  • Update frequency: every 174.8 days
  • Top authors: rwky (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /2,992 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.00MB] [CPU: ▼2.13ms] Passed 4 tests

An overview of server-side resources used by Delete product images for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.70 ▲2.58
Dashboard /wp-admin3.31 ▲0.0144.31 ▼16.30
Posts /wp-admin/edit.php3.36 ▲0.0049.07 ▲6.46
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.44 ▲4.34
Media Library /wp-admin/upload.php3.23 ▲0.0035.43 ▲0.87

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Delete product images for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.26 ▼1.121.65 ▼0.1639.61 ▼4.37
Dashboard /wp-admin2,206 ▲154.87 ▼1.01107.58 ▲1.7942.77 ▼1.88
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0439.54 ▲0.2337.45 ▼3.29
Add New Post /wp-admin/post-new.php1,542 ▲918.46 ▼4.88593.42 ▼3.2649.32 ▼0.71
Media Library /wp-admin/upload.php1,388 ▼04.22 ▲0.0395.65 ▼4.0541.73 ▲0.81

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

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)
Good news, no errors were detected

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/wc-delete-product-images/delete-product-images-wc.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
7 plugin tags: woocommerce product images delete, woocommerce product images remove, product images remove, product images, remove product images automatically...

wc-delete-product-images/delete-product-images-wc.php 92% from 13 tests

The entry point to "Delete product images for WooCommerce" version 1.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wc-delete-product-images.php" instead of "delete-product-images-wc.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected20 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP172020

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.71
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%
Functions1
▷ Named functions1100.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
There are no PNG files in this plugin