89% review-stars-count-for-woocommerce

Code Review | Review Stars Count For WooCommerce

WordPress plugin Review Stars Count For WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: review-stars-coun...
  • Plugin version: 1.2
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Sep 5, 2017
  • Latest release: Sep 4, 2023
  • Number of updates: 13
  • Update frequency: every 168.9 days
  • Top authors: Magnigenie (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /1,961 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

A check of server-side resources used by Review Stars Count For WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.15 ▼2.64
Dashboard /wp-admin3.31 ▲0.0044.13 ▼6.45
Posts /wp-admin/edit.php3.36 ▲0.0046.44 ▼8.11
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.46 ▼5.48
Media Library /wp-admin/upload.php3.23 ▲0.0031.83 ▼3.12

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Review Stars Count For WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6613.54 ▼0.831.67 ▼0.0542.51 ▲0.96
Dashboard /wp-admin2,206 ▲214.85 ▼1.06108.81 ▲5.9042.62 ▼2.06
Posts /wp-admin/edit.php2,092 ▲31.96 ▼0.0739.10 ▼12.7635.85 ▲1.26
Add New Post /wp-admin/post-new.php1,533 ▲1923.26 ▲5.83649.17 ▼9.2149.59 ▼3.31
Media Library /wp-admin/upload.php1,388 ▼04.41 ▲0.18103.83 ▲7.4544.81 ▲0.02

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 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 Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 86% 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
6 plugin tags: woocommerce addon, woocommerce star count, review stars, woocommerce, woocommerce reivew...

review-stars-count-for-woocommerce/woo-star-count.php 69% from 13 tests

The primary PHP file in "Review Stars Count For WooCommerce" version 1.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("review-stars-count-for-woocommerce.php" instead of "woo-star-count.php")
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin2,241 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS2312131,590
PHP43347453
JavaScript338134198

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity12.00
▷ Minimum class complexity3.00
▷ Maximum class complexity21.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin