89% woo-advance-product-gallery

Code Review | WooCommerce Advance Product Gallery

WordPress plugin WooCommerce Advance Product Gallery scored89%from 54 tests.

About plugin

  • Plugin page: woo-advance-produ...
  • Plugin version: 2.1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.4.1
  • WordPress version: 6.3.1
  • First release: Jun 13, 2019
  • Latest release: Jul 7, 2020
  • Number of updates: 21
  • Update frequency: every 18.6 days
  • Top authors: acespritech (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /1,286 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

A check of server-side resources used by WooCommerce Advance Product Gallery
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0524.32 ▼14.75
Dashboard /wp-admin3.34 ▲0.0355.83 ▲4.38
Posts /wp-admin/edit.php3.39 ▲0.0354.18 ▲2.99
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.67 ▼8.22
Media Library /wp-admin/upload.php3.26 ▲0.0338.42 ▲4.86

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

WooCommerce Advance Product Gallery: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,466 ▼29514.19 ▼0.190.77 ▼1.0517.75 ▼25.98
Dashboard /wp-admin2,210 ▲305.58 ▼0.0782.79 ▼4.6536.86 ▼4.87
Posts /wp-admin/edit.php2,109 ▲92.01 ▲0.0235.58 ▼5.5933.25 ▼4.04
Add New Post /wp-admin/post-new.php1,538 ▲523.22 ▼0.00677.04 ▲56.1866.42 ▲12.69
Media Library /wp-admin/upload.php1,415 ▲154.19 ▼0.0199.09 ▼0.4947.40 ▲1.22

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

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

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)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed: The official readme.txt is a good inspiration

woo-advance-product-gallery/advance-product-gallery.php 85% from 13 tests

"WooCommerce Advance Product Gallery" version 2.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-advance-product-gallery.php" instead of "advance-product-gallery.php")
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin991 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript515350676
PHP15810184
CSS5611131

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin