78% bg-book-publisher

Code Review | Bg Book Publisher

WordPress plugin Bg Book Publisher scored78%from 54 tests.

About plugin

  • Plugin page: bg-book-publisher
  • Plugin version: 1.25
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Nov 4, 2017
  • Latest release: Jun 1, 2023
  • Number of updates: 11
  • Update frequency: every 185.0 days
  • Top authors: VBog (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,479 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.26MB] [CPU: ▼22.43ms] Passed 4 tests

A check of server-side resources used by Bg Book Publisher
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0931.44 ▼5.24
Dashboard /wp-admin3.35 ▲0.0042.51 ▼35.31
Posts /wp-admin/edit.php3.39 ▲0.0441.58 ▼4.45
Add New Post /wp-admin/post-new.php4.72 ▼1.1649.49 ▼44.71
Media Library /wp-admin/upload.php3.35 ▲0.1233.97 ▲3.32
Book Publisher /wp-admin/options-general.php?page=bg_bpub_slug3.3233.14

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
bg_bpub_options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Bg Book Publisher
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8813.29 ▼1.154.86 ▲3.2240.90 ▼0.34
Dashboard /wp-admin2,212 ▲304.89 ▲0.03109.27 ▲6.9541.66 ▼0.16
Posts /wp-admin/edit.php2,101 ▲122.01 ▼0.0339.30 ▲1.8336.49 ▲1.63
Add New Post /wp-admin/post-new.php6,271 ▲4,75226.15 ▲3.10927.03 ▲268.4759.83 ▲3.23
Media Library /wp-admin/upload.php1,394 ▲34.38 ▲0.15100.64 ▼0.4244.05 ▼1.40
Book Publisher /wp-admin/options-general.php?page=bg_bpub_slug9022.0528.0230.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/bg-book-publisher/bg_bpub.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_option() in wp-content/plugins/bg-book-publisher/inc/options.php:8

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: book, publisher, level, nextpage, table of contents...

bg-book-publisher/bg_bpub.php 85% from 13 tests

The principal PHP file in "Bg Book Publisher" v. 1.25 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bg-book-publisher.php" instead of "bg_bpub.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 plugin615 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP2122162417
CSS193100
PO File1234374
JavaScript20024

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
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%
Functions30
▷ Named functions2790.00%
▷ Anonymous functions310.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin