84% woocommerce-product-archive-image-slider

Code Review | WooCommerce Product Archive Image Slider

WordPress plugin WooCommerce Product Archive Image Slider scored 84% from 54 tests.

About plugin

  • Plugin page: woocommerce-produ...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.9.2
  • WordPress version: 6.3.1
  • First release: Sep 18, 2014
  • Latest release: Sep 25, 2014
  • Number of updates: 10
  • Update frequency: every 0.8 days
  • Top authors: zamtual (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,531 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.78ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Product Archive Image Slider
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0050.73 ▲7.95
Dashboard /wp-admin3.31 ▲0.0047.99 ▼0.07
Posts /wp-admin/edit.php3.36 ▲0.0049.15 ▼2.85
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.91 ▼7.94
Media Library /wp-admin/upload.php3.23 ▲0.0036.26 ▲3.75

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Product Archive Image Slider
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.43 ▲0.132.10 ▼0.6351.65 ▲4.62
Dashboard /wp-admin2,200 ▲125.83 ▲0.02109.30 ▲4.8139.74 ▼0.58
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0539.39 ▲3.6635.61 ▲2.46
Add New Post /wp-admin/post-new.php1,519 ▼2323.08 ▲5.13659.16 ▲62.5858.53 ▼7.76
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.0193.67 ▼12.7542.40 ▼2.17

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/woocommerce-product-archive-image-slider/image-slider.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
6 plugin tags: product archive, ecommerce, photos, images, woocommerce...

woocommerce-product-archive-image-slider/image-slider.php 92% from 13 tests

This is the main PHP file of "WooCommerce Product Archive Image Slider" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woocommerce-product-archive-image-slider.php" instead of "image-slider.php")

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
Good job! No executable or dangerous file extensions detected247 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript11021101
PHP1752572
CSS115342
PO File171832

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.23MB with 0.14MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png238.44KB92.95KB▼ 61.02%