84% wp-bookwidgets

Code Review | WP BookWidgets

WordPress plugin WP BookWidgets scored84%from 54 tests.

About plugin

  • Plugin page: wp-bookwidgets
  • Plugin version: 0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.4
  • WordPress version: 6.3.1
  • First release: Nov 7, 2016
  • Latest release: May 17, 2021
  • Number of updates: 15
  • Update frequency: every 110.4 days
  • Top authors: remko (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /1,507 total downloads

Benchmarks

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: ▼12.77ms] Passed 4 tests

A check of server-side resources used by WP BookWidgets
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0633.55 ▼4.91
Dashboard /wp-admin3.36 ▲0.0141.61 ▼22.40
Posts /wp-admin/edit.php3.47 ▲0.1146.04 ▼2.79
Add New Post /wp-admin/post-new.php5.94 ▲0.0576.38 ▼20.98
Media Library /wp-admin/upload.php3.28 ▲0.0536.67 ▲4.40
BookWidgets /wp-admin/options-general.php?page=bw-settings3.2429.87

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WP BookWidgets
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.22 ▼1.144.75 ▲2.8641.18 ▼4.24
Dashboard /wp-admin2,210 ▲225.86 ▲0.78108.97 ▼8.0543.94 ▼1.62
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0335.28 ▲0.7932.97 ▼1.23
Add New Post /wp-admin/post-new.php1,537 ▲1823.63 ▲0.21675.61 ▼15.5154.21 ▼4.96
Media Library /wp-admin/upload.php1,392 ▲14.22 ▲0.0396.06 ▼2.6340.04 ▼8.40
BookWidgets /wp-admin/options-general.php?page=bw-settings8322.0227.7126.65

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_bookwidgets\\add_shortcode() in wp-content/plugins/wp-bookwidgets/wp-bookwidgets.php:134

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: bookwidgets, education, widgets

wp-bookwidgets/wp-bookwidgets.php Passed 13 tests

The primary PHP file in "WP BookWidgets" version 0.8 is used by WordPress to initiate all plugin functionality
52 characters long description:
Integrate BookWidgets widgets in your WordPress site

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
No dangerous file extensions were detected238 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14244213
CSS14025

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions736.84%
▷ Anonymous functions1263.16%
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 are no PNG files in this plugin