89% bookvault

Code Review | Bookvault

WordPress plugin Bookvault scored89%from 54 tests.

About plugin

  • Plugin page: bookvault
  • Plugin version: 3.4.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Oct 26, 2022
  • Latest release: Nov 17, 2023
  • Number of updates: 10
  • Update frequency: every 38.7 days
  • Top authors: bookvault (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,184 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.54ms] Passed 4 tests

Server-side resources used by Bookvault
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0935.15 ▼4.38
Dashboard /wp-admin3.39 ▲0.0948.45 ▼2.89
Posts /wp-admin/edit.php3.50 ▲0.1549.17 ▲2.01
Add New Post /wp-admin/post-new.php5.97 ▲0.0882.02 ▼16.90
Media Library /wp-admin/upload.php3.31 ▲0.0836.62 ▲5.11

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Bookvault
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲6514.02 ▼0.322.11 ▲0.1536.75 ▼6.62
Dashboard /wp-admin2,223 ▲495.60 ▼0.0595.44 ▼7.7539.60 ▼4.91
Posts /wp-admin/edit.php2,140 ▲401.98 ▼0.0242.09 ▲3.4135.99 ▼0.45
Add New Post /wp-admin/post-new.php1,536 ▲723.12 ▲0.02684.91 ▲5.5466.21 ▲10.76
Media Library /wp-admin/upload.php1,440 ▲374.17 ▲0.01100.75 ▼1.4041.56 ▼4.45

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
The official readme.txt might help

bookvault/Bookvault.php 77% from 13 tests

This is the main PHP file of "Bookvault" version 3.4.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bookvault.php" instead of "Bookvault.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.3" instead of "5.6")
  • Requires PHP: Required version must be the same as the one declared in readme.txt ("5.6" instead of "5.6.20")

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
Good job! No executable or dangerous file extensions detected510 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP310073468
CSS15042

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.23MB with 0.15MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/bv-logo-long.png11.88KB5.85KB▼ 50.76%
assets/img/bv-logo.png227.56KB53.52KB▼ 76.48%