84% woo-delete-product-images

Code Review | Woocommerce Delete Product Images

WordPress plugin Woocommerce Delete Product Images scored84%from 54 tests.

About plugin

  • Plugin page: woo-delete-produc...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.0
  • WordPress version: 6.3.1
  • First release: Mar 20, 2018
  • Latest release: Jun 22, 2022
  • Number of updates: 20
  • Update frequency: every 77.9 days
  • Top authors: husainahmedqureshi (100%)

Code review

54 tests

User reviews

22 reviews

Install metrics

3,000+ active /14,111 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
Install script ran successfully

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

An overview of server-side resources used by Woocommerce Delete Product Images
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.95 ▼5.53
Dashboard /wp-admin3.31 ▼0.0451.41 ▼13.06
Posts /wp-admin/edit.php3.36 ▲0.0048.91 ▼2.31
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.49 ▼21.21
Media Library /wp-admin/upload.php3.23 ▲0.0035.20 ▼1.34

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woocommerce Delete Product Images
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲6814.79 ▲0.411.97 ▲0.1941.77 ▼3.27
Dashboard /wp-admin2,200 ▲235.64 ▼0.0584.34 ▼6.6740.85 ▼4.71
Posts /wp-admin/edit.php2,111 ▲82.03 ▲0.0637.72 ▼4.1534.18 ▼6.88
Add New Post /wp-admin/post-new.php1,433 ▼9822.21 ▼0.88546.68 ▼98.6829.24 ▼20.90
Media Library /wp-admin/upload.php1,408 ▲114.20 ▼0.0496.78 ▼2.4938.58 ▼9.42

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/woo-delete-product-images/wdpi.php:17

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
There were no plugin tags found

woo-delete-product-images/wdpi.php 85% from 13 tests

The primary PHP file in "Woocommerce Delete Product Images" version 1.0.2 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-delete-product-images.php" instead of "wdpi.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("3.7" instead of "3.0.0")

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 detected25 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP161325

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 issues
Cyclomatic complexity
Average complexity per logical line of code0.30
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