94% woocommerce-stars-shortcode

Code Review | WooCommerce Stars Shortcode

WordPress plugin WooCommerce Stars Shortcode scored 94% from 54 tests.

About plugin

  • Plugin page: woocommerce-stars...
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 5.8.1
  • First release: Feb 13, 2013
  • Latest release: Feb 13, 2013
  • Number of updates: 2
  • Update frequency: every 3.5 days
  • Top authors: rooteerooroo (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

100+ active / 5,263 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by WooCommerce Stars Shortcode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0133.64 ▼0.52
Dashboard /wp-admin3.07 ▲0.0253.72 ▲7.94
Posts /wp-admin/edit.php3.12 ▲0.0245.76 ▲0.08
Add New Post /wp-admin/post-new.php5.43 ▼0.0092.62 ▼562.68
Media Library /wp-admin/upload.php3.01 ▲0.0132.36 ▼0.02

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Stars Shortcode
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.89 ▼0.098.97 ▼2.5743.77 ▼8.12
Dashboard /wp-admin2,970 ▲396.01 ▼0.05159.20 ▲6.82114.22 ▼2.18
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0170.49 ▲5.5887.63 ▼0.48
Add New Post /wp-admin/post-new.php1,604 ▼1118.76 ▼2.51389.13 ▲97.76107.04 ▲4.17
Media Library /wp-admin/upload.php1,807 ▼05.06 ▲0.05155.06 ▲2.93119.59 ▼9.99

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% 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 50% 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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/woocommerce-stars-shortcode/woocommerce_stars_shortcode.php:28

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, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: woocommerce, rating, ratings, shortcode, stars

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

The main PHP script in "WooCommerce Stars Shortcode" version 0.5 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("woocommerce-stars-shortcode.php" instead of "woocommerce_stars_shortcode.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 235 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin78 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1302078

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin