84% book-review-block

Code Review | Book Review Block

WordPress plugin Book Review Block scored84%from 54 tests.

About plugin

  • Plugin page: book-review-block
  • Plugin version: 2.1.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.1
  • WordPress version: 6.3.1
  • First release: Jan 11, 2018
  • Latest release: Mar 19, 2023
  • Number of updates: 47
  • Update frequency: every 40.3 days
  • Top authors: donnapep (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

700+ active /11,952 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼7.27ms] Passed 4 tests

A check of server-side resources used by Book Review Block
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0940.40 ▲1.34
Dashboard /wp-admin3.38 ▲0.0351.14 ▼18.75
Posts /wp-admin/edit.php3.49 ▲0.1459.26 ▲10.30
Add New Post /wp-admin/post-new.php5.97 ▲0.0890.83 ▼13.12
Media Library /wp-admin/upload.php3.30 ▲0.0741.22 ▲1.46

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Book Review Block: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5613.36 ▼1.441.62 ▼0.1046.41 ▲3.13
Dashboard /wp-admin2,212 ▲95.83 ▲0.94100.57 ▼6.5039.61 ▼8.70
Posts /wp-admin/edit.php2,103 ▲32.03 ▼0.0338.95 ▲0.2030.15 ▼5.93
Add New Post /wp-admin/post-new.php6,366 ▲4,83527.88 ▲4.69854.22 ▲176.3957.70 ▲2.59
Media Library /wp-admin/upload.php1,400 ▼34.28 ▲0.05106.50 ▼19.7146.83 ▼2.12

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/book-review-block/src/blocks/deprecated/v2/book-review.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: book, book review, rating, review, book blog...

book-review-block/book-review-block.php Passed 13 tests

"Book Review Block" version 2.1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
78 characters long description:
A Gutenberg block to add book details and a star rating to a book review post.

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
There were no executable files found in this plugin1,866 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript16106821,268
PHP563158348
JSON400133
Sass3242115
CSS2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity5.33
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.93
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods14
▷ Static methods321.43%
▷ Public methods1071.43%
▷ Protected methods00.00%
▷ Private methods428.57%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin