84% pb-star-rating-block

Code Review | Star Rating Block for Block Editor

WordPress plugin Star Rating Block for Block Editor scored84%from 54 tests.

About plugin

  • Plugin page: pb-star-rating-block
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.4.1
  • WordPress version: 6.3.1
  • First release: Jun 9, 2021
  • Latest release: Nov 19, 2023
  • Number of updates: 6
  • Update frequency: every 148.8 days
  • Top authors: mhimon (66.67%)ultradevs (50%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /409 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: ▼5.35ms] Passed 4 tests

Analyzing server-side resources used by Star Rating Block for Block Editor
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0138.84 ▼2.40
Dashboard /wp-admin3.31 ▲0.0142.57 ▼5.20
Posts /wp-admin/edit.php3.37 ▲0.0143.53 ▼0.23
Add New Post /wp-admin/post-new.php5.89 ▲0.0179.08 ▼10.44
Media Library /wp-admin/upload.php3.24 ▲0.0131.60 ▼3.34

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Star Rating Block for Block Editor
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4614.67 ▲0.491.76 ▲0.1541.49 ▼2.05
Dashboard /wp-admin2,195 ▲175.60 ▼0.0488.69 ▼26.2441.54 ▼3.01
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0139.27 ▲0.0937.80 ▲4.42
Add New Post /wp-admin/post-new.php6,200 ▲4,67419.17 ▼3.88926.66 ▲204.6056.49 ▼2.71
Media Library /wp-admin/upload.php1,400 ▼34.28 ▲0.1897.07 ▼7.0541.78 ▼5.10

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pb-star-rating-block/star-rating.php:26

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 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
4 plugin tags: ratings, block, star rating, review

pb-star-rating-block/star-rating.php 85% from 13 tests

"Star Rating Block for Block Editor" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("pb-star-rating-block.php" instead of "star-rating.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin27 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JSON10014
CSS2006
PHP21206
JavaScript1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin