Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully
Server metrics [RAM: ▼0.01MB] [CPU: ▲1.47ms] Passed 4 tests
An overview of server-side resources used by BetterBook
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.39 ▼0.07 | 314.12 ▲270.41 |
Dashboard /wp-admin | 3.31 ▲0.01 | 44.03 ▲0.68 |
Posts /wp-admin/edit.php | 3.36 ▲0.01 | 41.03 ▼1.57 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.01 | 90.76 ▲6.46 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 34.61 ▲0.33 |
BetterBook /wp-admin/options-general.php?page=BetterBook | 3.24 | 30.64 |
Server storage [IO: ▲0.26MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_recent-posts |
can_compress_scripts |
db_upgraded |
widget_recent-comments |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
A check of browser resources used by BetterBook
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲65 | 13.24 ▼1.35 | 1.61 ▼0.35 | 39.52 ▼6.05 |
Dashboard /wp-admin | 2,213 ▲27 | 5.87 ▲0.89 | 100.40 ▼10.77 | 39.64 ▲0.72 |
Posts /wp-admin/edit.php | 2,093 ▲4 | 2.02 ▲0.03 | 37.72 ▼0.15 | 34.88 ▲1.76 |
Add New Post /wp-admin/post-new.php | 1,539 ▲5 | 23.33 ▲0.04 | 623.03 ▲23.05 | 52.52 ▲4.94 |
Media Library /wp-admin/upload.php | 1,392 ▲10 | 4.20 ▲0.01 | 93.06 ▼12.96 | 40.88 ▼2.28 |
BetterBook /wp-admin/options-general.php?page=BetterBook | 854 | 2.03 | 23.40 | 26.18 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
- This plugin did not uninstall successfully, leaving 6 options in the database
- theysaidso_admin_options
- widget_recent-posts
- db_upgraded
- widget_theysaidso_widget
- widget_recent-comments
- can_compress_scripts
Smoke tests 50% 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 0% 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
- 5× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/betterbook/includes/shortcode.php
- > /wp-content/plugins/betterbook/admin/betterbook_notice.php
- > /wp-content/plugins/betterbook/index.php
- > /wp-content/plugins/betterbook/includes/enqueue.php
- > /wp-content/plugins/betterbook/admin/index.php
- 2× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Warning
Use of undefined constant BETTERBOOK_APIKEY_NONCE - assumed 'BETTERBOOK_APIKEY_NONCE' (this will throw an Error in a future version of PHP) in wp-content/plugins/betterbook/admin/betterbook_admin.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/betterbook/admin/betterbook_admin.php:4
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected
Optimizations
Plugin configuration 86% from 29 tests
readme.txt 94% from 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
- Plugin Name: You should set the name of your plugin on the first line (
=== betterbook ===
)
betterbook/index.php 77% from 13 tests
This is the main PHP file of "BetterBook" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
- Requires at least: The required version number must match the one declared in readme.txt ("2.0" instead of "5.2")
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("betterbook.php" instead of "index.php")
- Description: Keep the plugin description shorter than 140 characters (currently 147 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin175 lines of code in 6 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 6 | 44 | 15 | 175 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.31 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 7 | |
▷ Named functions | 3 | 42.86% |
▷ Anonymous functions | 4 | 57.14% |
Constants | 6 | |
▷ Global constants | 6 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.25MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/screenshot-1.png | 43.60KB | 14.46KB | ▼ 66.84% |
assets/icon-256x256.png | 4.31KB | 2.04KB | ▼ 52.79% |
assets/screenshot-3.png | 24.54KB | 8.39KB | ▼ 65.81% |
assets/screenshot-2.png | 24.70KB | 9.22KB | ▼ 62.69% |
assets/banner-1544x500.png | 154.12KB | 48.54KB | ▼ 68.50% |