84% ydnf-delete-product-images

Code Review | Remove Product Images

WordPress plugin Remove Product Images scored84%from 54 tests.

About plugin

  • Plugin page: ydnf-delete-produ...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.7.2
  • WordPress version: 6.3.1
  • First release: Jun 27, 2021
  • Latest release: Jun 28, 2021
  • Number of updates: 11
  • Update frequency: every 0.6 days
  • Top authors: ydarwin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

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

Analyzing server-side resources used by Remove Product Images
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.92 ▲1.66
Dashboard /wp-admin3.31 ▲0.0050.11 ▲0.38
Posts /wp-admin/edit.php3.36 ▲0.0048.31 ▼3.16
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.69 ▼11.77
Media Library /wp-admin/upload.php3.23 ▲0.0037.25 ▼1.76

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Remove Product Images
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.21 ▼1.483.03 ▲1.2353.05 ▲8.72
Dashboard /wp-admin2,206 ▲184.86 ▼0.03101.29 ▼2.4843.07 ▲1.56
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0337.44 ▼2.7435.70 ▼1.98
Add New Post /wp-admin/post-new.php1,532 ▼123.11 ▼0.15643.09 ▼45.6460.90 ▲3.59
Media Library /wp-admin/upload.php1,391 ▼04.22 ▲0.0598.61 ▼21.2346.50 ▼2.30

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ydnf-delete-product-images/RemoveProductImages.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: woocommerce, images, gallery

ydnf-delete-product-images/RemoveProductImages.php 85% from 13 tests

The entry point to "Remove Product Images" version 1.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 358 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("ydnf-delete-product-images.php" instead of "RemoveProductImages.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected54 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1161454

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
5 PNG files occupy 0.14MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png39.76KB16.07KB▼ 59.59%
assets/banner-772x250.png39.76KB16.07KB▼ 59.59%
icon.png12.56KB5.09KB▼ 59.44%
screenshot-1.png39.76KB16.07KB▼ 59.59%
assets/icon-128x128.png12.56KB5.09KB▼ 59.44%