Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully
Server metrics [RAM: ▲0.05MB] [CPU: ▼2.30ms] Passed 4 tests
This is a short check of server-side resources used by LitRes Widget
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.52 ▲0.06 | 41.58 ▲0.23 |
Dashboard /wp-admin | 3.36 ▲0.05 | 48.68 ▼3.20 |
Posts /wp-admin/edit.php | 3.41 ▲0.06 | 46.22 ▼1.60 |
Add New Post /wp-admin/post-new.php | 5.94 ▲0.06 | 88.09 ▼4.64 |
Media Library /wp-admin/upload.php | 3.28 ▲0.05 | 37.86 ▲3.93 |
Server storage [IO: ▲0.10MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options |
---|
litreswidget_options |
db_upgraded |
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-posts |
theysaidso_admin_options |
widget_recent-comments |
Browser metrics Passed 4 tests
An overview of browser requirements for LitRes Widget
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,817 ▲82 | 13.29 ▼0.86 | 1.89 ▼0.02 | 40.06 ▼3.76 |
Dashboard /wp-admin | 2,216 ▲28 | 4.86 ▼0.05 | 101.58 ▼0.79 | 40.36 ▼1.12 |
Posts /wp-admin/edit.php | 2,096 ▲7 | 2.01 ▼0.04 | 34.81 ▼0.52 | 31.07 ▼3.65 |
Add New Post /wp-admin/post-new.php | 1,551 ▲18 | 18.31 ▼4.99 | 605.57 ▼78.82 | 63.46 ▲2.35 |
Media Library /wp-admin/upload.php | 1,398 ▲7 | 4.35 ▲0.18 | 102.34 ▼0.18 | 43.98 ▼3.91 |
LitRes Widget /wp-admin/litres-widget.php | 26 | 0.44 | 0.07 | 13.99 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
- Zombie WordPress options detected upon uninstall: 6 options
- widget_recent-comments
- db_upgraded
- can_compress_scripts
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
- 1× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/litres-widget/litres-widget.php:19
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
- > GET request to /wp-admin/litres-widget.php
- > Network (severe)
wp-admin/litres-widget.php - Failed to load resource: the server responded with a status of 404 (Not Found)
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
1 plugin tags: litres
litres-widget/litres-widget.php Passed 13 tests
The principal PHP file in "LitRes Widget" v. 1.01 is loaded by WordPress automatically on each request
119 characters long description:
Данный плагин выводит партнерский виджет покупки книг от ЛитРес.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected641 lines of code in 7 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 4 | 75 | 30 | 328 |
PHP | 1 | 53 | 50 | 234 |
CSS | 2 | 2 | 7 | 79 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.17 |
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 | 18 | |
▷ Named functions | 18 | 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
PNG files should be compressed to save space and minimize bandwidth usage
3 compressed PNG files occupy 0.01MB
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
img/icon_coffee.png | 5.14KB | 5.32KB | 0.00% |
img/about.png | 5.94KB | 6.12KB | 0.00% |
inc/litres.png | 0.65KB | 0.66KB | 0.00% |