Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully
Server metrics [RAM: ▲0.05MB] [CPU: ▼5.38ms] Passed 4 tests
A check of server-side resources used by Buy This Book
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.51 ▲0.05 | 36.94 ▼3.32 |
Dashboard /wp-admin | 3.36 ▲0.05 | 44.80 ▼4.90 |
Posts /wp-admin/edit.php | 3.41 ▲0.05 | 48.93 ▼0.28 |
Add New Post /wp-admin/post-new.php | 5.94 ▲0.05 | 88.54 ▼12.82 |
Media Library /wp-admin/upload.php | 3.28 ▲0.05 | 35.11 ▼0.46 |
Server storage [IO: ▲0.26MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-comments |
widget_buy_book |
widget_theysaidso_widget |
can_compress_scripts |
theysaidso_admin_options |
db_upgraded |
widget_recent-posts |
Browser metrics Passed 4 tests
A check of browser resources used by Buy This Book
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,908 ▲173 | 13.97 ▼0.39 | 5.85 ▲4.06 | 46.02 ▲5.11 |
Dashboard /wp-admin | 2,206 ▲18 | 4.81 ▼0.11 | 109.25 ▲7.92 | 41.34 ▼3.66 |
Posts /wp-admin/edit.php | 2,089 ▼0 | 1.99 ▼0.06 | 42.94 ▼2.28 | 35.36 ▼3.57 |
Add New Post /wp-admin/post-new.php | 1,514 ▼19 | 17.45 ▼5.79 | 622.56 ▼66.31 | 59.91 ▲1.47 |
Media Library /wp-admin/upload.php | 1,379 ▼6 | 4.16 ▼0.03 | 99.63 ▼3.52 | 42.13 ▲1.56 |
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 7 options in the database
- widget_recent-comments
- widget_buy_book
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-posts
- db_upgraded
- can_compress_scripts
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)
Even though no errors were found, this is by no means an exhaustive test
SRP 50% 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
The following issues need your attention
- 1× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/buy-this-book/buy-this-book.php:36
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 88% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
- Tags: Please delete some tags, you are using 11 tag instead of maximum 10
- Screenshots: These screenshots require images: #1 (Screenshot Buy This Book - Widget), #2 (Screenshot Buy This Book - Front end)
buy-this-book/buy-this-book.php 92% from 13 tests
This is the main PHP file of "Buy This Book" version 1.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
- Description: Please don't use more than 140 characters for the plugin description (currently 447 characters long)
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
No dangerous file extensions were detected181 lines of code in 4 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 19 | 55 | 160 |
JavaScript | 1 | 0 | 0 | 12 |
CSS | 2 | 0 | 0 | 9 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.28 |
Average class complexity | 27.00 |
▷ Minimum class complexity | 27.00 |
▷ Maximum class complexity | 27.00 |
Average method complexity | 7.50 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 15.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 4 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 4 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 3 | |
▷ Named functions | 3 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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
7 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
icons/iBooks.png | 2.26KB | 1.85KB | ▼ 18.09% |
icons/Amazon.png | 4.28KB | 1.54KB | ▼ 64.10% |
icons/Barnes and Noble.png | 4.42KB | 1.75KB | ▼ 60.42% |
icons/Kobo.png | 0.96KB | 1.02KB | 0.00% |
icons/Createspace.png | 2.01KB | 1.64KB | ▼ 18.34% |