84% star-rating-block

Code Review | Star Rating Block

WordPress plugin Star Rating Block scored84%from 54 tests.

About plugin

  • Plugin page: star-rating-block
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.2-5.8.0
  • WordPress version: 6.3.1
  • First release: Sep 9, 2020
  • Latest release: Aug 3, 2021
  • Number of updates: 4
  • Update frequency: every 82.0 days
  • Top authors: ibachal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /7,516 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: ▼9.34ms] Passed 4 tests

An overview of server-side resources used by Star Rating Block
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0140.78 ▲6.11
Dashboard /wp-admin3.32 ▼0.0345.12 ▼13.45
Posts /wp-admin/edit.php3.37 ▲0.0143.03 ▼3.88
Add New Post /wp-admin/post-new.php5.89 ▲0.0179.15 ▼21.98
Media Library /wp-admin/upload.php3.24 ▲0.0133.38 ▲1.96

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Star Rating Block
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.31 ▼1.441.67 ▲0.0343.71 ▲5.13
Dashboard /wp-admin2,209 ▲205.86 ▲0.9497.62 ▼6.8738.67 ▼4.68
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0234.88 ▲0.9933.95 ▲0.19
Add New Post /wp-admin/post-new.php6,354 ▲4,83527.95 ▲4.61879.51 ▲207.8157.53 ▲10.59
Media Library /wp-admin/upload.php1,391 ▲94.19 ▼0.00107.58 ▼32.2446.73 ▼10.37

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 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/star-rating-block/star-rating.php:60

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

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

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

This is the main PHP file of "Star Rating Block" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("star-rating-block.php" instead of "star-rating.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected57 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP251640
JSON10014
CSS2202
JavaScript1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.07
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

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin