83% image-flip-for-woocommerce

Code Review | Image Flip For WooCommerce

WordPress plugin Image Flip For WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: image-flip-for-wo...
  • Plugin version: 0.1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.8.1
  • WordPress version: 6.3.1
  • First release: Jul 11, 2019
  • Latest release: Sep 23, 2021
  • Number of updates: 20
  • Update frequency: every 40.3 days
  • Top authors: bhubbard (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

70+ active /2,066 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Server-side resources used by Image Flip For WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.23 ▼6.00
Dashboard /wp-admin3.32 ▲0.0150.36 ▼2.34
Posts /wp-admin/edit.php3.37 ▲0.0152.47 ▲5.15
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.41 ▼1.34
Media Library /wp-admin/upload.php3.24 ▲0.0139.97 ▲5.56

Server storage [IO: ▲0.04MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
These are issues you should consider
  • There were 1 file (4.00KB) illegally modified outside of "wp-content/plugins/image-flip-for-woocommerce/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Image Flip For WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.44 ▼0.121.75 ▼0.0242.59 ▲0.90
Dashboard /wp-admin2,224 ▲214.83 ▼0.21102.90 ▼5.5841.03 ▲2.27
Posts /wp-admin/edit.php2,100 ▼02.03 ▼0.0139.31 ▲3.2038.94 ▲3.43
Add New Post /wp-admin/post-new.php1,546 ▼423.26 ▲0.12654.73 ▲7.8765.95 ▲2.15
Media Library /wp-admin/upload.php1,400 ▼04.25 ▲0.04110.25 ▲5.8844.67 ▲1.63

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • 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)
The smoke test was a success, however most plugin functionality was not tested

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 apply_filters() in wp-content/plugins/image-flip-for-woocommerce/image-flip-for-woocommerce.php:21

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 an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: ecommerce, woocommerce, product photos, front and back, product...

image-flip-for-woocommerce/image-flip-for-woocommerce.php 85% from 13 tests

This is the main PHP file of "Image Flip For WooCommerce" version 0.1.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Domain Path: The domain path folder was not found ("/languages")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 141 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin117 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2336476
Sass110040
CSS1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity5.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

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