78% smart-product-gallery-slider

Code Review | Smart Product Gallery Slider

WordPress plugin Smart Product Gallery Slider scored78%from 54 tests.

About plugin

  • Plugin page: smart-product-gal...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.2.1
  • WordPress version: 6.3.1
  • First release: Jun 11, 2016
  • Latest release: May 25, 2019
  • Number of updates: 8
  • Update frequency: every 134.9 days
  • Top authors: TheAnuvhuti (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

500+ active /14,567 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
Installer ran successfully

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

Server-side resources used by Smart Product Gallery Slider
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.25 ▼4.88
Dashboard /wp-admin3.31 ▲0.0043.72 ▼0.69
Posts /wp-admin/edit.php3.36 ▲0.0042.35 ▼2.95
Add New Post /wp-admin/post-new.php5.89 ▲0.0076.34 ▼32.25
Media Library /wp-admin/upload.php3.23 ▲0.0031.13 ▼0.82

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Smart Product Gallery Slider: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.26 ▼1.131.93 ▼0.1543.51 ▼3.02
Dashboard /wp-admin2,206 ▲155.80 ▼0.1199.03 ▼2.1037.97 ▼2.35
Posts /wp-admin/edit.php2,086 ▼32.03 ▲0.0534.23 ▼6.3734.51 ▼4.20
Add New Post /wp-admin/post-new.php1,520 ▼2123.12 ▲4.91639.73 ▲29.2251.33 ▲4.29
Media Library /wp-admin/upload.php1,388 ▼04.22 ▼0.0594.88 ▼2.6240.43 ▼6.60

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 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
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/smart-product-gallery-slider/uninstall.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smart-product-gallery-slider/admin/smart_product_slider_menu.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/smart-product-gallery-slider/smart-product-gallery-slider.php:12

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 97% 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:
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

smart-product-gallery-slider/smart-product-gallery-slider.php Passed 13 tests

The main PHP script in "Smart Product Gallery Slider" version 1.0.4 is automatically included on every request by WordPress
132 characters long description:
Smart Product gallery slider will allows you to display a nice image slideshow in the product pages instead of the default lightbox.

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
Success! There were no dangerous files found in this plugin1,701 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP51,43925831
JavaScript611973497
CSS324544373

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.67
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
6 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/close.png0.27KB0.29KB0.00%
images/a02.png5.63KB3.45KB▼ 38.77%
images/t01.png1.58KB0.74KB▼ 53.49%
images/next.png1.32KB1.58KB0.00%
images/a17.png5.38KB3.32KB▼ 38.24%