90% secondary-product-image-for-woocommerce

Code Review | Secondary Product Image for WooCommerce

WordPress plugin Secondary Product Image for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: secondary-product...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.3
  • WordPress version: 6.3.1
  • First release: Feb 9, 2023
  • Latest release: Aug 9, 2023
  • Number of updates: 6
  • Update frequency: every 30.2 days
  • Top authors: WPZOOM (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /1,184 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
The plugin installed gracefully, with no errors

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

Server-side resources used by Secondary Product Image for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.14 ▲0.14
Dashboard /wp-admin3.32 ▲0.0148.14 ▼0.19
Posts /wp-admin/edit.php3.43 ▲0.0745.98 ▲2.19
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.43 ▼3.92
Media Library /wp-admin/upload.php3.24 ▲0.0133.98 ▼2.50

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Secondary Product Image for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲7813.28 ▼1.124.55 ▲2.7044.37 ▲0.69
Dashboard /wp-admin2,228 ▲435.84 ▲0.80100.02 ▼26.3140.92 ▼17.32
Posts /wp-admin/edit.php2,110 ▲212.02 ▲0.0337.34 ▲3.2832.98 ▼3.04
Add New Post /wp-admin/post-new.php1,554 ▲4023.51 ▲6.06597.24 ▼97.0948.41 ▼2.59
Media Library /wp-admin/upload.php1,407 ▲194.21 ▼0.0194.93 ▼14.3140.85 ▼6.63

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
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: secondary, product, woocommerce, hover, product image...

secondary-product-image-for-woocommerce/secondary-product-image-for-woocommerce.php 92% from 13 tests

The principal PHP file in "Secondary Product Image for WooCommerce" v. 1.0.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 162 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin520 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP4157280399
JavaScript215892
CSS22029

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity22.00
▷ Minimum class complexity6.00
▷ Maximum class complexity48.00
Average method complexity2.85
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods34
▷ Static methods823.53%
▷ Public methods3294.12%
▷ Protected methods00.00%
▷ Private methods25.88%
Functions0
▷ Named functions00.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 images were found in this plugin