78% review-slider-for-woocommerce

Code Review | Review Slider for WooCommerce

WordPress plugin Review Slider for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: review-slider-for...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Oct 28, 2021
  • Latest release: Aug 18, 2023
  • Number of updates: 14
  • Update frequency: every 48.0 days
  • Top authors: jgwhite33 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active /2,575 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
Install script ran successfully

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

Server-side resources used by Review Slider for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2039.51 ▼0.56
Dashboard /wp-admin3.52 ▲0.2247.38 ▼1.92
Posts /wp-admin/edit.php3.64 ▲0.2846.46 ▼2.72
Add New Post /wp-admin/post-new.php6.10 ▲0.2190.71 ▲7.76
Media Library /wp-admin/upload.php3.45 ▲0.2134.70 ▲5.06
Templates /wp-admin/admin.php?page=srfw-templates_posts3.6833.91
WooCommerce Reviews /wp-admin/admin.php?page=srfw-get_woo3.4236.45
Get Pro /wp-admin/admin.php?page=srfw-get_pro3.4231.38
Reviews List /wp-admin/admin.php?page=srfw-reviews3.4733.98

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 64 new files
Database: 2 new tables, 9 new options
New tables
wp_srfw_reviews
wp_srfw_post_templates
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
srfw_activated_time_woo
review-slider-for-woocommerce_version
widget_recent-comments
db_upgraded
widget_recent-posts
review-slider-for-woocommerce_current_db_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for Review Slider for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,951 ▲21614.03 ▼0.276.12 ▲4.2138.97 ▼5.75
Dashboard /wp-admin2,241 ▲564.89 ▲0.00141.42 ▲24.2742.41 ▼3.04
Posts /wp-admin/edit.php2,127 ▲382.06 ▲0.0439.85 ▲3.9535.22 ▲1.43
Add New Post /wp-admin/post-new.php1,575 ▲6118.50 ▲0.98602.93 ▼66.5469.82 ▲0.43
Media Library /wp-admin/upload.php1,423 ▲324.29 ▼0.0296.18 ▼9.8240.91 ▼0.41
Templates /wp-admin/admin.php?page=srfw-templates_posts1,9913.1675.0029.66
WooCommerce Reviews /wp-admin/admin.php?page=srfw-get_woo1,0082.2024.9129.50
Get Pro /wp-admin/admin.php?page=srfw-get_pro8972.0124.2626.61
Reviews List /wp-admin/admin.php?page=srfw-reviews9281.8531.9828.25

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • review-slider-for-woocommerce_current_db_version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
  • 12× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/review-slider-for-woocommerce/public/partials/review-slider-for-woocommerce-public-display.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_query_arg() in wp-content/plugins/review-slider-for-woocommerce/admin/partials/tabmenu.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/review-slider-for-woocommerce/admin/partials/get_woo.php:16
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/review-slider-for-woocommerce/public/partials/review-slider-for-woocommerce-public-display.php:22
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/review-slider-for-woocommerce/public/partials/review-slider-for-woocommerce-public-display.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/review-slider-for-woocommerce/admin/partials/review_list.php:16
    • > PHP Notice
      Undefined variable: a in wp-content/plugins/review-slider-for-woocommerce/public/partials/review-slider-for-woocommerce-public-display.php on line 21
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/review-slider-for-woocommerce/public/partials/template_style_1.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/review-slider-for-woocommerce/public/class-review-slider-for-woocommerce-template_action.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/review-slider-for-woocommerce/admin/partials/get_pro.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=srfw-templates_posts
    • > Network (severe)
    wp-content/plugins/review-slider-for-woocommerce/admin/js/wpzillow-wp-color-picker-alpha.js?ver=2.1.2 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === review-slider-for-woocommerce === )
  • Screenshots: Screenshot #5 (Create as many templates as you like.) image not found
Please take inspiration from this readme.txt

review-slider-for-woocommerce/review-slider-for-woocommerce.php Passed 13 tests

The main file in "Review Slider for WooCommerce" v. 1.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
140 characters long description:
Easily display all your WooCommerce reviews at once in a cool summary review slider or grid on your homepage or any other page on your site.

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
Everything looks great! No dangerous files found in this plugin3,679 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP184569072,084
JavaScript82906041,132
CSS52320463

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity12.75
▷ Minimum class complexity1.00
▷ Maximum class complexity86.00
Average method complexity2.84
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods51
▷ Static methods47.84%
▷ Public methods4486.27%
▷ Protected methods00.00%
▷ Private methods713.73%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
21 PNG files occupy 0.41MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/partials/template1_thumb.png27.86KB9.86KB▼ 64.61%
public/partials/imgs/testimonial_quote.png0.30KB0.30KB0.00%
public/partials/imgs/stars_5_yellow.png6.71KB1.90KB▼ 71.61%
public/partials/imgs/stars_4.png6.73KB1.87KB▼ 72.14%
public/partials/imgs/stars_4_yellow.png6.73KB1.87KB▼ 72.14%