78% ecommerce-product-slider-gallery

Code Review | eCommerce Product Slider Gallery

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

About plugin

  • Plugin page: ecommerce-product...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Sep 30, 2022
  • Latest release: Nov 1, 2022
  • Number of updates: 4
  • Update frequency: every 8.0 days
  • Top authors: webdzier (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /269 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼10.38ms] Passed 4 tests

An overview of server-side resources used by eCommerce Product Slider Gallery
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.18 ▲3.36
Dashboard /wp-admin3.34 ▼0.0148.25 ▼8.02
Posts /wp-admin/edit.php3.39 ▲0.0343.11 ▼4.82
Add New Post /wp-admin/post-new.php5.94 ▲0.0679.25 ▼27.42
Media Library /wp-admin/upload.php3.26 ▲0.0334.49 ▼1.25
Add New /wp-admin/post-new.php?post_type=epsg_slider3.7144.40
All Sliders /wp-admin/edit.php?post_type=epsg_slider3.3034.22

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 37 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for eCommerce Product Slider Gallery
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,982 ▲22113.71 ▼0.7312.80 ▲10.8244.73 ▲7.19
Dashboard /wp-admin2,271 ▲905.62 ▼0.1286.32 ▼21.6283.06 ▲37.47
Posts /wp-admin/edit.php2,174 ▲742.16 ▲0.1935.85 ▼7.1832.75 ▼2.11
Add New Post /wp-admin/post-new.php1,748 ▲22222.59 ▼0.29692.46 ▼4.2453.73 ▼5.73
Media Library /wp-admin/upload.php1,476 ▲734.30 ▲0.0997.14 ▼2.4783.32 ▲40.21
Add New /wp-admin/post-new.php?post_type=epsg_slider3,1032.6453.6880.83
All Sliders /wp-admin/edit.php?post_type=epsg_slider1,1581.9932.3531.74

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ecommerce-product-slider-gallery/inc/cpt/product-slider-cpt.php:3
    • > PHP Warning
      Use of undefined constant EPSG_PATH - assumed 'EPSG_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ecommerce-product-slider-gallery/inc/slider-layouts/layout-one/layout-one.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ecommerce-product-slider-gallery/inc/dashboard_notice.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/ecommerce-product-slider-gallery/inc/shortcode.php:3
    • > PHP Fatal error
      require(): Failed opening required 'EPSG_PATHinc/slider-layouts/layout-one/css/layout-one-css.php' (include_path='.:/usr/share/php') in wp-content/plugins/ecommerce-product-slider-gallery/inc/slider-layouts/layout-one/layout-one.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ecommerce-product-slider-gallery/inc/enqueue.php:3
    • > PHP Warning
      require(EPSG_PATHinc/slider-layouts/layout-one/css/layout-one-css.php): failed to open stream: No such file or directory in wp-content/plugins/ecommerce-product-slider-gallery/inc/slider-layouts/layout-one/layout-one.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/ecommerce-product-slider-gallery/inc/cpt/product-slider-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/ecommerce-product-slider-gallery/inc/slider-layouts/layout-one/css/layout-one-css.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/post-new.php?post_type=epsg_slider
    • > Rendering (warning) in unknown
    /wp-admin/post-new.php?post_type=epsg_slider 735 The specified value "#000" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/post-new.php?post_type=epsg_slider
    • > Rendering (warning) in unknown
    /wp-admin/post-new.php?post_type=epsg_slider 747 The specified value "000" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/post-new.php?post_type=epsg_slider
    • > Rendering (warning) in unknown
    /wp-admin/post-new.php?post_type=epsg_slider 759 The specified value "#000" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/post-new.php?post_type=epsg_slider
    • > Rendering (warning) in unknown
    /wp-admin/post-new.php?post_type=epsg_slider 763 The specified value "#000" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/post-new.php?post_type=epsg_slider
    • > Rendering (warning) in unknown
    /wp-admin/post-new.php?post_type=epsg_slider 792 The specified value "#000" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/post-new.php?post_type=epsg_slider
    • > Rendering (warning) in unknown
    /wp-admin/post-new.php?post_type=epsg_slider 804 The specified value "#000" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/post-new.php?post_type=epsg_slider
    • > Rendering (warning) in unknown
    /wp-admin/post-new.php?post_type=epsg_slider 817 The specified value "#000" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/post-new.php?post_type=epsg_slider
    • > Rendering (warning) in unknown
    /wp-admin/post-new.php?post_type=epsg_slider 821 The specified value "#000" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/post-new.php?post_type=epsg_slider
    • > Rendering (warning) in unknown
    /wp-admin/post-new.php?post_type=epsg_slider 850 The specified value "#000" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 33 tag instead of maximum 10
You can look at the official readme.txt

ecommerce-product-slider-gallery/ecommerce-product-slider-gallery.php 92% from 13 tests

The principal PHP file in "eCommerce Product Slider Gallery" v. 1.0.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 231 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin17,042 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
CSS1083512813,526
PHP920681,523
JavaScript7103231,308
SVG100685

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/product-notice.png7.39KB2.70KB▼ 63.47%
assets/images/chosen-sprite.png0.53KB0.88KB0.00%
assets/images/product Icon.png3.49KB1.05KB▼ 69.97%