83% advanced-rating-block

Code Review | Advanced Rating Gutenberg Block - Star, Heart, Circle Rating

WordPress plugin Advanced Rating Gutenberg Block - Star, Heart, Circle Rating scored83%from 54 tests.

About plugin

  • Plugin page: advanced-rating-b...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.1.1
  • WordPress version: 6.3.1
  • First release: May 24, 2022
  • Latest release: Nov 27, 2022
  • Number of updates: 3
  • Update frequency: every 62.4 days
  • Top authors: binsaifullah (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /487 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.91ms] Passed 4 tests

Server-side resources used by Advanced Rating Gutenberg Block - Star, Heart, Circle Rating
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.84 ▼2.76
Dashboard /wp-admin3.34 ▲0.0448.80 ▼4.02
Posts /wp-admin/edit.php3.39 ▲0.0450.25 ▼0.59
Add New Post /wp-admin/post-new.php5.93 ▲0.0491.85 ▼8.25
Media Library /wp-admin/upload.php3.27 ▲0.0437.98 ▲2.07
Rating Block /wp-admin/tools.php?page=adrb-rating3.2330.57

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Rating Gutenberg Block - Star, Heart, Circle Rating
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.23 ▼0.351.77 ▲0.0746.13 ▲1.93
Dashboard /wp-admin2,196 ▲195.48 ▼0.0488.45 ▼10.7638.91 ▼7.07
Posts /wp-admin/edit.php2,104 ▲11.95 ▼0.0835.69 ▼7.9034.77 ▼3.38
Add New Post /wp-admin/post-new.php6,201 ▲4,67519.24 ▼4.46990.20 ▲376.4963.70 ▲12.13
Media Library /wp-admin/upload.php1,404 ▲14.18 ▼0.02102.85 ▼0.1342.69 ▼2.60
Rating Block /wp-admin/tools.php?page=adrb-rating1,4329.12299.7391.65

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
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-rating-block/admin/admin.php:11

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


Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed: You can take inspiration from this readme.txt

advanced-rating-block/plugin.php 77% from 13 tests

The primary PHP file in "Advanced Rating Gutenberg Block - Star, Heart, Circle Rating" version 1.0.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Requires PHP: Required version must match the one declared in readme.txt ("5.4" instead of "7.0")
  • Requires at least: Required version must match the one declared in readme.txt ("5.0" instead of "5.7")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("advanced-rating-block.php" instead of "plugin.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 plugin1,164 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity2.50
▷ Minimum class complexity2.00
▷ Maximum class complexity3.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
▷ Static methods111.11%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ 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
There were not PNG files found in your plugin