78% product-sider

Code Review | Product Slider

WordPress plugin Product Slider scored78%from 54 tests.

About plugin

  • Plugin page: product-sider
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 6.3.1
  • First release: Aug 21, 2021
  • Latest release: Aug 23, 2021
  • Number of updates: 9
  • Update frequency: every 2.9 days
  • Top authors: trkl9676 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /399 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼0.90ms] Passed 4 tests

An overview of server-side resources used by Product Slider
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0546.29 ▲0.77
Dashboard /wp-admin3.33 ▲0.0353.40 ▲2.37
Posts /wp-admin/edit.php3.38 ▲0.0351.88 ▲4.14
Add New Post /wp-admin/post-new.php5.91 ▲0.0386.87 ▼3.32
Media Library /wp-admin/upload.php3.26 ▲0.0337.46 ▼3.42

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

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

Browser metrics Passed 4 tests

Product Slider: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲15113.95 ▼0.648.14 ▲5.9649.97 ▲2.42
Dashboard /wp-admin2,218 ▲304.86 ▼0.09108.20 ▼10.7739.64 ▼2.82
Posts /wp-admin/edit.php2,101 ▲122.02 ▲0.0440.29 ▲3.4736.63 ▲2.47
Add New Post /wp-admin/post-new.php1,543 ▲1023.43 ▲0.03678.29 ▼9.7657.66 ▲5.90
Media Library /wp-admin/upload.php1,400 ▲124.21 ▼0.01111.09 ▼5.8851.30 ▲4.75

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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
Please take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/product-sider/includes/slider-assets/next_arrow.php
    • > /wp-content/plugins/product-sider/includes/slider-assets/prev_arrow.php
  • 11× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/product-sider/functions.php:5
    • > PHP Notice
      Undefined variable: plslider_slider in wp-content/plugins/product-sider/includes/slider-assets/main_slider.php on line 2
    • > PHP Notice
      Undefined variable: plslider_dots_style in wp-content/plugins/product-sider/includes/slider-assets/javascripts.php on line 9
    • > PHP Notice
      Undefined variable: plslider_show_dots in wp-content/plugins/product-sider/includes/slider-assets/dots.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/product-sider/includes/sliders.php:76
    • > PHP Notice
      Undefined variable: plslider_dots_style in wp-content/plugins/product-sider/includes/slider-assets/javascripts.php on line 12
    • > PHP Notice
      Undefined variable: plslider_show_arrows in wp-content/plugins/product-sider/includes/slider-assets/next_arrow.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/product-sider/includes/slider-assets/main_slider.php:2
    • > PHP Notice
      Undefined variable: plslider_show_arrows in wp-content/plugins/product-sider/includes/slider-assets/prev_arrow.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/product-sider/includes/slider-assets/javascripts.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: devtarik, tarikul, woo-ps, woo-product-slider, slider...

product-sider/product-slider.php 85% from 13 tests

Analyzing the main PHP file in "Product Slider" version 1.0.4
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("product-sider.php" instead of "product-slider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin1,643 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
CSS213316662
Sass21210653
PHP914452328
JavaScript116390

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
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%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected