Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
- The plugin did not install without errors
- > Deprecated in wp-content/plugins/book-previewer/jhbpclasses.php+746
Function create_function() is deprecated
Server metrics [RAM: ▼1.63MB] [CPU: ▼51.69ms] Passed 4 tests
A check of server-side resources used by Book Previewer
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.36 ▼1.10 | 5.50 ▼33.22 |
Dashboard /wp-admin | 2.38 ▼0.92 | 7.51 ▼47.06 |
Posts /wp-admin/edit.php | 2.38 ▼0.97 | 7.55 ▼38.43 |
Add New Post /wp-admin/post-new.php | 2.38 ▼3.51 | 6.88 ▼88.06 |
Media Library /wp-admin/upload.php | 2.38 ▼0.85 | 7.56 ▼26.62 |
Usage /wp-admin/admin.php?page=bookpreviewer-usages | 2.38 | 7.75 |
Book Previewer /wp-admin/options-general.php?page=bookpreviewer-options | 2.38 | 7.40 |
Server storage [IO: ▲0.70MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 8 new options
New WordPress options |
---|
widget_recent-posts |
can_compress_scripts |
widget_recent-comments |
widget_theysaidso_widget |
bookpreviewer-clearcache |
theysaidso_admin_options |
db_upgraded |
widget_jhbp_widget |
Browser metrics Passed 4 tests
A check of browser resources used by Book Previewer
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,968 ▲233 | 14.14 ▼0.25 | 12.46 ▲10.92 | 36.72 ▼9.49 |
Dashboard /wp-admin | 2,210 ▲22 | 4.88 ▼1.03 | 110.80 ▼36.02 | 44.69 ▼11.22 |
Posts /wp-admin/edit.php | 2,093 ▲4 | 2.02 ▲0.01 | 35.29 ▼6.20 | 31.40 ▼4.89 |
Add New Post /wp-admin/post-new.php | 1,668 ▲154 | 18.75 ▲1.04 | 589.32 ▼32.81 | 53.71 ▲7.28 |
Media Library /wp-admin/upload.php | 1,395 ▲10 | 4.18 ▲0.00 | 97.57 ▲0.88 | 43.87 ▲1.03 |
Usage /wp-admin/admin.php?page=bookpreviewer-usages | 895 | 2.02 | 24.69 | 32.96 |
Book Previewer /wp-admin/options-general.php?page=bookpreviewer-options | 1,089 | 2.03 | 27.42 | 26.16 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
- This plugin did not uninstall without warnings or errors
- > Deprecated in wp-content/plugins/book-previewer/jhbpclasses.php+746
Function create_function() is deprecated
- This plugin does not fully uninstall, leaving 7 options in the database
- theysaidso_admin_options
- db_upgraded
- widget_jhbp_widget
- widget_theysaidso_widget
- widget_recent-posts
- widget_recent-comments
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=bookpreviewer-options
- > Deprecated in wp-content/plugins/book-previewer/jhbpclasses.php+746
Function create_function() is deprecated
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
Please fix the following items
- 5× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/book-previewer/index.php
- > /wp-content/plugins/book-previewer/jhbpclasses.php
- > /wp-content/plugins/book-previewer/lang/index.php
- > /wp-content/plugins/book-previewer/js/index.php
- > /wp-content/plugins/book-previewer/book-previewer.php
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 93% from 29 tests
readme.txt 94% 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
Attributes that need to be fixed:
- Screenshots: These screenshots do not have images: #1 (The Book Previewer Settings page), #2 (The shortcode in a post), #3 (The plugin in action as a popup button)
book-previewer/book-previewer.php 92% from 13 tests
The primary PHP file in "Book Previewer" version 1.0.6 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin916 lines of code in 6 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 5 | 102 | 91 | 885 |
JavaScript | 1 | 8 | 24 | 31 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.29 |
Average class complexity | 44.00 |
▷ Minimum class complexity | 33.00 |
▷ Maximum class complexity | 55.00 |
Average method complexity | 2.54 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 17.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 56 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 46 | 82.14% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 10 | 17.86% |
Functions | 0 | |
▷ Named functions | 0 | 0.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 50% from 2 tests
Image compression 50% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.63MB with 0.29MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-3.png | 389.48KB | 178.57KB | ▼ 54.15% |
screenshot-2.png | 131.73KB | 74.82KB | ▼ 43.21% |
screenshot-1.png | 127.95KB | 78.89KB | ▼ 38.35% |