99% woo-extra-variation-images

Code Review | WooCommerce Extra Variation Images

WordPress plugin WooCommerce Extra Variation Images scored 99% from 54 tests.

About plugin

  • Plugin page: woo-extra-variati...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.5
  • WordPress version: 5.8.1
  • First release: Jul 3, 2017
  • Latest release: Jul 3, 2017
  • Number of updates: 6
  • Update frequency: every 1.2 days
  • Top authors: D001928403 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,060 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by WooCommerce Extra Variation Images
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0138.48 ▼1.16
Dashboard /wp-admin3.07 ▲0.0143.83 ▼2.21
Posts /wp-admin/edit.php3.12 ▲0.0148.10 ▼2.18
Add New Post /wp-admin/post-new.php5.43 ▼0.0198.79 ▼571.98
Media Library /wp-admin/upload.php3.01 ▲0.0136.20 ▼0.38

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Extra Variation Images
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,712 ▲11616.19 ▲0.588.90 ▼1.5752.39 ▼0.03
Dashboard /wp-admin2,979 ▲455.94 ▼0.22148.16 ▼5.56125.30 ▲12.67
Posts /wp-admin/edit.php2,748 ▲92.69 ▲0.0183.75 ▲10.85103.02 ▲5.77
Add New Post /wp-admin/post-new.php1,689 ▲618.34 ▼0.40415.04 ▲27.26117.92 ▼0.71
Media Library /wp-admin/upload.php1,816 ▲95.00 ▼0.01157.52 ▼11.59128.57 ▼0.82

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
No output text or server-side errors detected on direct access of PHP files

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 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (screenshot1.png), #2 (screenshot2.png), #3 (screenshot3.png)
You can take inspiration from this readme.txt

woo-extra-variation-images/woocommerce-extra-variation-images.php 92% from 13 tests

"WooCommerce Extra Variation Images" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-extra-variation-images.php" instead of "woocommerce-extra-variation-images.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected442 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP792125310
JavaScript26470
CSS23062

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity7.25
▷ Minimum class complexity3.00
▷ Maximum class complexity17.00
Average method complexity2.79
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods14
▷ Static methods214.29%
▷ Public methods14100.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 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 1.10MB with 0.63MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png221.01KB75.43KB▼ 65.87%
images/screenshot3.png192.07KB59.90KB▼ 68.81%
images/screenshot1.png221.01KB75.43KB▼ 65.87%
screenshot-2.png149.75KB84.77KB▼ 43.39%
images/screenshot2.png149.75KB84.77KB▼ 43.39%