90% wc-variation-images

Code Review | Product Variation Images for WooCommerce

WordPress plugin Product Variation Images for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: wc-variation-images
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.1
  • WordPress version: 6.3.1
  • First release: Aug 30, 2019
  • Latest release: Nov 20, 2022
  • Number of updates: 10
  • Update frequency: every 117.9 days
  • Top authors: manikmist09 (90%)manzurahammed (20%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,566 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
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.90ms] Passed 4 tests

Server-side resources used by Product Variation Images for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.15 ▼2.59
Dashboard /wp-admin3.34 ▲0.0454.55 ▼5.96
Posts /wp-admin/edit.php3.46 ▲0.1048.88 ▼2.25
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.88 ▼12.81
Media Library /wp-admin/upload.php3.25 ▲0.0241.95 ▲5.13

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
woocommercevariationimages
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Product Variation Images for WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲9014.46 ▲0.081.98 ▲0.3238.55 ▼8.02
Dashboard /wp-admin2,217 ▲354.84 ▼1.06103.11 ▼15.7643.17 ▼2.76
Posts /wp-admin/edit.php2,100 ▲112.10 ▲0.0836.28 ▼0.2738.26 ▲0.76
Add New Post /wp-admin/post-new.php1,525 ▼1717.64 ▼0.89674.96 ▼6.3367.87 ▲5.29
Media Library /wp-admin/upload.php1,399 ▲144.27 ▼0.03102.59 ▼9.6644.36 ▼5.24

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

Smoke tests Passed 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)
Good news, no errors were detected

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: product variation images for woocommerce, gallery, woocommerce, product variation, variation images

wc-variation-images/wc-variation-images.php 92% from 13 tests

The entry point to "Product Variation Images for WooCommerce" version 1.0.3 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.4" instead of "3.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin996 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP10166459876
JavaScript42024118
CSS2002

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.37
Average class complexity21.50
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity2.49
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods55
▷ Static methods11.82%
▷ Public methods5396.36%
▷ Protected methods11.82%
▷ Private methods11.82%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
No PNG files were detected