10% book-widget

Code Review | Book Widget

WordPress plugin Book Widget scored10%from 54 tests.

About plugin

  • Plugin page: book-widget
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 15, 2016
  • Latest release: Apr 16, 2016
  • Number of updates: 14
  • Update frequency: every 2.4 days
  • Top authors: fweeb (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /2,156 total downloads


Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/book-widget/book_widget.php+172
    Function create_function() is deprecated

Server metrics [RAM: ▼1.89MB] [CPU: ▼53.47ms] Passed 4 tests

This is a short check of server-side resources used by Book Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.364.29 ▼35.11
Dashboard /wp-admin2.12 ▼1.185.46 ▼45.71
Posts /wp-admin/edit.php2.13 ▼1.237.97 ▼41.65
Add New Post /wp-admin/post-new.php2.12 ▼3.778.26 ▼91.42
Media Library /wp-admin/upload.php2.13 ▼1.115.25 ▼30.71

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Book Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,964 ▲21814.95 ▲0.641.94 ▲0.3039.31 ▼12.16
Dashboard /wp-admin2,348 ▲1606.52 ▲1.64132.01 ▲14.1041.18 ▼4.44
Posts /wp-admin/edit.php2,262 ▲1763.41 ▲1.3852.07 ▲13.0433.84 ▲0.22
Add New Post /wp-admin/post-new.php1,516 ▼2617.61 ▼0.75624.83 ▲11.3837.09 ▼18.86
Media Library /wp-admin/upload.php1,392 ▲44.14 ▼0.0180.42 ▼19.9243.32 ▼1.50

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/book-widget/book_widget.php+172
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_book_widget
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

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
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/book-widget/book_widget.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: google play books, nook, affiliate links, widget, kobo...

book-widget/book_widget.php 92% from 13 tests

The main PHP script in "Book Widget" version 1.1.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("book-widget.php" instead of "book_widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin154 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity7.40
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods5100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/btn_kobo.png0.43KB0.40KB▼ 5.72%
img/btn_ibooks.png1.13KB1.05KB▼ 7.16%
img/btn_nook.png0.41KB0.38KB▼ 5.74%
img/btn_amazon.png0.70KB0.66KB▼ 5.87%