Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.02MB] [CPU: ▼4.80ms] Passed 4 tests
A check of server-side resources used by Random Winner
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.03 | 39.38 ▼7.40 |
Dashboard /wp-admin | 3.34 ▼0.01 | 53.38 ▼8.99 |
Posts /wp-admin/edit.php | 3.39 ▲0.03 | 55.21 ▲3.28 |
Add New Post /wp-admin/post-new.php | 5.94 ▲0.05 | 98.83 ▼3.97 |
Media Library /wp-admin/upload.php | 3.26 ▲0.03 | 37.53 ▲1.15 |
Server storage [IO: ▲0.11MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 6 new files
Database: 1 new table, 6 new options
New tables |
---|
wp_aj_winners |
New WordPress options |
---|
can_compress_scripts |
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-comments |
widget_recent-posts |
db_upgraded |
Browser metrics Passed 4 tests
A check of browser resources used by Random Winner
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,806 ▲45 | 14.24 ▼0.48 | 1.75 ▲0.04 | 42.51 ▲1.61 |
Dashboard /wp-admin | 2,215 ▲35 | 5.65 ▲0.03 | 88.02 ▼6.72 | 84.72 ▲45.81 |
Posts /wp-admin/edit.php | 2,120 ▲20 | 2.02 ▼0.01 | 37.15 ▼3.91 | 33.30 ▼7.21 |
Add New Post /wp-admin/post-new.php | 1,694 ▲168 | 22.44 ▼0.51 | 732.01 ▲85.96 | 51.73 ▲3.63 |
Media Library /wp-admin/upload.php | 1,414 ▲17 | 4.21 ▲0.01 | 103.49 ▼3.17 | 77.71 ▲32.15 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
- This plugin does not fully uninstall, leaving 1 table in the database
- wp_aj_winners
- The uninstall procedure has failed, leaving 6 options in the database
- can_compress_scripts
- widget_recent-posts
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-comments
- db_upgraded
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 everything seems fine, this is not an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
- 1× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/random-winner/winners.php:12
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: choose winner, winners
random-winner/winners.php 92% from 13 tests
The principal PHP file in "Random Winner" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("random-winner.php" instead of "winners.php")
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
Good job! No executable or dangerous file extensions detected199 lines of code in 2 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 9 | 10 | 170 |
JavaScript | 1 | 4 | 0 | 29 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.25 |
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 | 6 | |
▷ Named functions | 6 | 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
Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
ico.png | 1.34KB | 1.28KB | ▼ 4.51% |
Trophy.png | 60.20KB | 18.18KB | ▼ 69.80% |