10% rts-product-showcase

Code Review | RTS Product Showcase - WooCommerce Elementor Addon (Grid, SLider, List, Filter, Wishlist, Quickview)

WordPress plugin RTS Product Showcase - WooCommerce Elementor Addon (Grid, SLider, List, Filter, Wishlist, Quickview) scored10%from 54 tests.

About plugin

  • Plugin page: rts-product-showcase
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.0.1
  • WordPress version: 6.3.1
  • First release: Aug 28, 2022
  • Latest release: Sep 15, 2022
  • Number of updates: 13
  • Update frequency: every 5.7 days
  • Top authors: wpniceplugin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /281 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/rts-product-showcase/rts-product-showcase.php+21
    require_once(wp-content/plugins/rts-product-showcase/freemius/start.php): failed to open stream: No such file or directory

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

Server-side resources used by RTS Product Showcase - WooCommerce Elementor Addon (Grid, SLider, List, Filter, Wishlist, Quickview)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0045.43 ▲5.09
Dashboard /wp-admin3.31 ▲0.0046.87 ▼4.38
Posts /wp-admin/edit.php3.36 ▲0.0052.34 ▲1.22
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.68 ▼2.85
Media Library /wp-admin/upload.php3.23 ▲0.0036.61 ▼0.51

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 217 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for RTS Product Showcase - WooCommerce Elementor Addon (Grid, SLider, List, Filter, Wishlist, Quickview)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.16 ▼1.212.10 ▲0.1341.42 ▼1.45
Dashboard /wp-admin2,203 ▲155.84 ▼0.01106.31 ▼10.4339.73 ▼3.50
Posts /wp-admin/edit.php2,092 ▼02.00 ▼0.0240.57 ▲4.5938.28 ▲4.53
Add New Post /wp-admin/post-new.php1,542 ▲2818.21 ▲0.68623.75 ▼28.8052.87 ▲4.18
Media Library /wp-admin/upload.php1,379 ▼94.17 ▼0.0495.25 ▼8.0141.71 ▼1.90

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 13× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_get_product() in wp-content/plugins/rts-product-showcase/widgets/product-slider/style1.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/rts-product-showcase/widgets/product-grid/style5.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/rts-product-showcase/widgets/product-grid/style3.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function has_post_thumbnail() in wp-content/plugins/rts-product-showcase/widgets/product-slider/style4.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/rts-product-showcase/widgets/product-grid/style4.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_get_product() in wp-content/plugins/rts-product-showcase/widgets/product-grid/style1.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function has_post_thumbnail() in wp-content/plugins/rts-product-showcase/widgets/product-slider/style3.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_get_product() in wp-content/plugins/rts-product-showcase/widgets/product-grid/style2.php:2
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/rts-product-showcase/freemius/start.php' (include_path='.:/usr/share/php') in wp-content/plugins/rts-product-showcase/rts-product-showcase.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_get_product() in wp-content/plugins/rts-product-showcase/widgets/product-slider/style2.php:2

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #5, #0 in rts-product-showcase/assets to your readme.txt
You can look at the official readme.txt

rts-product-showcase/rts-product-showcase.php 92% from 13 tests

The primary PHP file in "RTS Product Showcase - WooCommerce Elementor Addon (Grid, SLider, List, Filter, Wishlist, Quickview)" version 1.0.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis 97% from 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
There were no executable files found in this plugin52,241 lines of code in 156 files:
LanguageFilesBlank linesComment linesLines of code
PHP1227,61316,36633,293
SVG457128,951
LESS4389324,858
CSS1716503,911
JSON200751
JavaScript65197263
Markdown1680214

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 2,911)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity84.69
▷ Minimum class complexity1.00
▷ Maximum class complexity2,911.00
Average method complexity4.63
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes49
▷ Abstract classes24.08%
▷ Concrete classes4795.92%
▷ Final classes12.13%
Methods1,160
▷ Static methods17415.00%
▷ Public methods81670.34%
▷ Protected methods191.64%
▷ Private methods32528.02%
Functions99
▷ Named functions99100.00%
▷ Anonymous functions00.00%
Constants129
▷ Global constants10178.29%
▷ Class constants2821.71%
▷ Public constants28100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
assets/css/time-line1.png8.21KB1.73KB▼ 78.92%
inc/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%