94% rating-block

Code Review | Rating Block

WordPress plugin Rating Block scored 94% from 54 tests.

About plugin

  • Plugin page: rating-block
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.2-5.8
  • WordPress version: 5.8.1
  • First release: Jul 29, 2020
  • Latest release: Jul 10, 2021
  • Number of updates: 8
  • Update frequency: every 43.5 days
  • Top authors: alam789 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 588 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼136.38ms] Passed 4 tests

Analyzing server-side resources used by Rating Block
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0235.44 ▲2.92
Dashboard /wp-admin3.07 ▲0.0159.27 ▲11.59
Posts /wp-admin/edit.php3.12 ▲0.0153.78 ▲5.76
Add New Post /wp-admin/post-new.php5.42 ▼0.0193.36 ▼550.23
Media Library /wp-admin/upload.php3.01 ▲0.0131.74 ▼3.97

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Rating Block
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,681 ▲10915.81 ▼0.2410.05 ▼5.7751.42 ▼0.27
Dashboard /wp-admin2,970 ▲465.93 ▼0.07139.56 ▼39.17100.06 ▼21.10
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0168.65 ▼0.6890.72 ▲0.73
Add New Post /wp-admin/post-new.php1,694 ▲1118.56 ▼0.17457.12 ▲52.78134.00 ▲20.95
Media Library /wp-admin/upload.php1,807 ▼35.05 ▲0.03158.32 ▲9.92117.51 ▼4.38

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

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
Good news, no errors were detected

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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rating-block/rating-block.php:62

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: block, gutenberg blocks, gutenberg, blocks, editor

rating-block/rating-block.php 92% from 13 tests

The primary PHP file in "Rating Block" version 1.0.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • 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 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected375 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript6230305
PHP251939
Sass23017
JSON10012
CSS2202

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.08
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 were not PNG files found in your plugin