84% better-woocommerce-stars-shortcode

Code Review | Better WooCommerce Stars Shortcode

WordPress plugin Better WooCommerce Stars Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: better-woocommerc...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8
  • WordPress version: 6.3.1
  • First release: Aug 24, 2015
  • Latest release: Aug 24, 2015
  • Number of updates: 6
  • Update frequency: every 108.0 days
  • Top authors: clicknathan (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /4,109 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.15ms] Passed 4 tests

A check of server-side resources used by Better WooCommerce Stars Shortcode
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.53 ▼2.55
Dashboard /wp-admin3.32 ▲0.0242.02 ▼6.71
Posts /wp-admin/edit.php3.37 ▲0.0148.01 ▼4.22
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.34 ▼15.10
Media Library /wp-admin/upload.php3.25 ▲0.0133.37 ▼0.93

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Better WooCommerce Stars Shortcode
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.21 ▼1.091.99 ▲0.3244.34 ▲1.85
Dashboard /wp-admin2,203 ▲155.76 ▼0.12104.94 ▼4.7339.88 ▼2.20
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0239.48 ▼2.8633.98 ▼1.40
Add New Post /wp-admin/post-new.php1,533 ▼023.10 ▼0.31649.08 ▼93.6150.61 ▼11.12
Media Library /wp-admin/upload.php1,391 ▲34.19 ▼0.1495.63 ▼1.6740.73 ▼5.43

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/better-woocommerce-stars-shortcode/woocommerce_stars_shortcode.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: rating, stars, ratings, woocommerce, shortcode

better-woocommerce-stars-shortcode/woocommerce_stars_shortcode.php 92% from 13 tests

The main file in "Better WooCommerce Stars Shortcode" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("better-woocommerce-stars-shortcode.php" instead of "woocommerce_stars_shortcode.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin95 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1362095

PHP code Passed 2 tests

A short review 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.50
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin