84% stars-rating

Code Review | Stars Rating

WordPress plugin Stars Rating scored84%from 54 tests.

About plugin

  • Plugin page: stars-rating
  • Plugin version: 4.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Feb 9, 2017
  • Latest release: Nov 15, 2023
  • Number of updates: 43
  • Update frequency: every 57.4 days
  • Top authors: fahidjavid (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

1,000+ active /17,280 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼7.61ms] Passed 4 tests

Analyzing server-side resources used by Stars Rating
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.77 ▼2.88
Dashboard /wp-admin3.42 ▲0.0744.36 ▼10.55
Posts /wp-admin/edit.php3.54 ▲0.1743.44 ▼3.78
Add New Post /wp-admin/post-new.php6.01 ▲0.1190.48 ▼12.94
Media Library /wp-admin/upload.php3.35 ▲0.1132.26 ▼3.15

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Stars Rating
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲14813.82 ▼0.899.25 ▲7.5242.68 ▼1.11
Dashboard /wp-admin2,202 ▲255.62 ▲0.0588.31 ▼3.8539.97 ▼4.27
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0235.84 ▼3.3335.61 ▼2.12
Add New Post /wp-admin/post-new.php6,239 ▲4,71326.06 ▲3.02821.28 ▲125.5462.25 ▲7.42
Media Library /wp-admin/upload.php1,404 ▲134.23 ▲0.0495.49 ▼8.1643.50 ▲1.49

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
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/stars-rating/admin/stars-rating-comments-column.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/stars-rating/includes/stars-rating-include.php:7

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 uses markdown syntax to describe your plugin to the world
7 plugin tags: voting, shortcode, reviews, rating, comments vote...

stars-rating/stars-rating.php 85% from 13 tests

The main file in "Stars Rating" v. 4.0.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:
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages")
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages")

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
No dangerous file extensions were detected3,492 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
PHP8238259670
CSS42213119
JavaScript26132

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity13.60
▷ Minimum class complexity5.00
▷ Maximum class complexity29.00
Average method complexity2.19
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes360.00%
Methods53
▷ Static methods815.09%
▷ Public methods53100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin