84% woocommerce-products-without-featured-images

Code Review | WooCommerce Products without featured images

WordPress plugin WooCommerce Products without featured images scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-produ...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.4
  • WordPress version: 6.3.1
  • First release: Mar 19, 2015
  • Latest release: Mar 19, 2015
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: SOFTAGON (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /3,470 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.58ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce Products without featured images
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.09 ▲1.34
Dashboard /wp-admin3.33 ▲0.0343.76 ▼3.12
Posts /wp-admin/edit.php3.38 ▲0.0241.93 ▼4.89
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.93 ▼17.77
Media Library /wp-admin/upload.php3.25 ▲0.0232.84 ▼0.54
Missing images /wp-admin/admin.php?page=softagon_product_without_image3.2230.64

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Products without featured images
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.17 ▼0.171.75 ▲0.0138.95 ▼3.86
Dashboard /wp-admin2,192 ▲125.53 ▼0.1686.27 ▼5.9139.15 ▼5.17
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0535.79 ▼2.2832.96 ▼0.10
Add New Post /wp-admin/post-new.php1,534 ▲818.29 ▼4.97591.95 ▼65.6872.64 ▲18.28
Media Library /wp-admin/upload.php1,400 ▼04.19 ▼0.0099.06 ▲2.4844.57 ▲0.69
Missing images /wp-admin/admin.php?page=softagon_product_without_image9512.0026.3829.89

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

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)
Everything seems fine, however 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
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/woocommerce-products-without-featured-images/softagon_product_without_image.php on line 63
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/woocommerce-products-without-featured-images/softagon_product_without_image.php on line 63
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/woocommerce-products-without-featured-images/softagon_product_without_image.php on line 63

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === woocommerce-products-without-featured-images === )
You can take inspiration from this readme.txt

woocommerce-products-without-featured-images/softagon_product_without_image.php 92% from 13 tests

The principal PHP file in "WooCommerce Products without featured images" v. 0.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woocommerce-products-without-featured-images.php" instead of "softagon_product_without_image.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin109 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15156109

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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.11MB with 0.08MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png21.41KB4.88KB▼ 77.20%
assets/screenshot-1.png88.63KB23.88KB▼ 73.05%