74% book-block

Code Review | Book

WordPress plugin Book scored74%from 54 tests.

About plugin

  • Plugin page: book-block
  • Plugin version: 0.1.0
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.0-5.5.0
  • WordPress version: 6.3.1
  • First release: Sep 14, 2020
  • Latest release: Sep 14, 2020
  • Number of updates: 7
  • Update frequency: every 2.9 days
  • Top authors: vcanales (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,213 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼1.21MB] [CPU: ▼43.20ms] Passed 4 tests

Server-side resources used by Book
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.76 ▼0.6913.09 ▼32.63
Dashboard /wp-admin2.80 ▼0.5016.38 ▼38.17
Posts /wp-admin/edit.php2.80 ▼0.5516.40 ▼28.22
Add New Post /wp-admin/post-new.php2.80 ▼3.0819.57 ▼73.79
Media Library /wp-admin/upload.php2.80 ▼0.4215.17 ▼22.61

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Book
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.25 ▼1.281.73 ▼0.5340.87 ▼5.94
Dashboard /wp-admin2,209 ▲215.89 ▲0.0196.15 ▼19.7742.19 ▼1.17
Posts /wp-admin/edit.php2,086 ▼62.06 ▲0.0239.14 ▼0.9735.85 ▲1.39
Add New Post /wp-admin/post-new.php1,681 ▲13922.26 ▼1.20645.92 ▼57.5755.07 ▲1.07
Media Library /wp-admin/upload.php1,388 ▲34.25 ▲0.0194.38 ▼12.3441.22 ▼5.26

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/book-block/book-block.php+44
    filemtime(): stat failed for wp-content/plugins/book-block/build/index.css
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/book-block/book-block.php:61
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/book-block/trunk/book-block.php:61

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
1 plugin tags: block

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

The main PHP script in "Book" version 0.1.0 is automatically included on every request by WordPress
34 characters long description:
Displays information about a book.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected35,464 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
JSON40034,725
JavaScript1050102553
Sass2217144
PHP351840
CSS2202

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
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%
Functions2
▷ Named functions2100.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
There were not PNG files found in your plugin