84% woo-image-flipper

Code Review | WooCommerce Image Flipper

WordPress plugin WooCommerce Image Flipper scored 84% from 54 tests.

About plugin

  • Plugin page: woo-image-flipper
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.7
  • WordPress version: 6.3.1
  • First release: May 10, 2017
  • Latest release: May 10, 2017
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: debabratsharma (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,166 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

An overview of server-side resources used by WooCommerce Image Flipper
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.51 ▼8.02
Dashboard /wp-admin3.31 ▲0.0045.64 ▼6.31
Posts /wp-admin/edit.php3.36 ▲0.0045.59 ▲0.05
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.75 ▼5.74
Media Library /wp-admin/upload.php3.23 ▲0.0031.77 ▼4.79

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Image Flipper
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.30 ▼1.091.73 ▼0.2443.40 ▼4.22
Dashboard /wp-admin2,203 ▲185.89 ▲0.04103.47 ▼1.7942.12 ▼1.45
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0239.35 ▲2.6035.08 ▲1.78
Add New Post /wp-admin/post-new.php1,534 ▲123.16 ▼0.06677.20 ▲27.1850.62 ▼0.56
Media Library /wp-admin/upload.php1,385 ▼64.23 ▲0.0895.03 ▼0.1741.09 ▼3.96

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
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 apply_filters() in wp-content/plugins/woo-image-flipper/image-flipper.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: ecommerce, images, product, woocommerce, photos...

woo-image-flipper/image-flipper.php 92% from 13 tests

The main PHP script in "WooCommerce Image Flipper" version 1.0 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-image-flipper.php" instead of "image-flipper.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin147 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS115687
PHP1262851
JavaScript1009

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin