84% woocommerce-product-image-flipper

Code Review | WooCommerce Product Image Flipper

WordPress plugin WooCommerce Product Image Flipper scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-produ...
  • Plugin version: 0.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.0.0
  • WordPress version: 6.3.1
  • First release: Oct 21, 2013
  • Latest release: Nov 26, 2018
  • Number of updates: 10
  • Update frequency: every 186.5 days
  • Top authors: jameskoster (100%)

Code review

54 tests

User reviews

28 reviews

Install metrics

6,000+ active /75,762 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.00MB] [CPU: ▼2.40ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce Product Image Flipper
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0033.83 ▼7.65
Dashboard /wp-admin3.31 ▲0.0044.85 ▼4.12
Posts /wp-admin/edit.php3.36 ▲0.0048.68 ▲1.95
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.92 ▲0.22
Media Library /wp-admin/upload.php3.23 ▲0.0033.99 ▲3.38

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

Input-output and database impact 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
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Product Image Flipper
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.26 ▼1.001.98 ▲0.0138.07 ▼11.25
Dashboard /wp-admin2,203 ▲125.86 ▲0.97108.41 ▲4.7546.93 ▲1.65
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0239.79 ▲2.2535.55 ▲0.54
Add New Post /wp-admin/post-new.php1,533 ▼023.25 ▲0.13679.10 ▼10.4762.14 ▲9.09
Media Library /wp-admin/upload.php1,385 ▲34.19 ▲0.0098.25 ▲1.5440.25 ▼1.45

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

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/woocommerce-product-image-flipper/image-flipper.php:19

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 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 photos, product, images, ecommerce...

woocommerce-product-image-flipper/image-flipper.php 85% from 13 tests

The main PHP script in "WooCommerce Product Image Flipper" version 0.4.2 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("woocommerce-product-image-flipper.php" instead of "image-flipper.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 141 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected101 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1283065
CSS110436

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
PNG images were not found in this plugin