Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully
Server metrics [RAM: ▲0.03MB] [CPU: ▼139.74ms] Passed 4 tests
A check of server-side resources used by WordPress Lottery
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.87 ▲0.03 | 37.57 ▲5.86 |
Dashboard /wp-admin | 3.10 ▲0.04 | 51.27 ▲3.84 |
Posts /wp-admin/edit.php | 3.15 ▲0.04 | 51.43 ▲5.95 |
Add New Post /wp-admin/post-new.php | 5.46 ▲0.02 | 97.96 ▼567.33 |
Media Library /wp-admin/upload.php | 3.04 ▲0.04 | 33.57 ▼1.34 |
Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
A check of browser resources used by WordPress Lottery
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,699 ▲103 | 15.79 ▲0.32 | 10.43 ▼0.61 | 51.07 ▼3.09 |
Dashboard /wp-admin | 2,990 ▲56 | 5.90 ▼0.04 | 144.28 ▼4.10 | 118.65 ▲0.63 |
Posts /wp-admin/edit.php | 2,759 ▲20 | 2.68 ▼0.02 | 68.06 ▼3.66 | 94.56 ▼3.74 |
Add New Post /wp-admin/post-new.php | 1,617 ▼66 | 18.90 ▲0.74 | 378.51 ▼26.03 | 116.29 ▼4.18 |
Media Library /wp-admin/upload.php | 1,830 ▲23 | 5.01 ▼0.01 | 151.05 ▲4.06 | 128.77 ▼1.09 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested
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
The following issues need your attention
- 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-lottery/wordpress-lottery.php:30
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected
Optimizations
Plugin configuration 93% 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
Attributes that require attention:
- Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line (
=== wp-lottery ===
)
wp-lottery/wordpress-lottery.php 92% from 13 tests
"WordPress Lottery" version 2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
- Main file name: Name the main plugin file the same as the plugin slug ("wp-lottery.php" instead of "wordpress-lottery.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected249 lines of code in 4 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 33 | 42 | 182 |
JavaScript | 1 | 3 | 5 | 48 |
CSS | 1 | 2 | 1 | 19 |
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.23 |
Average class complexity | 6.00 |
▷ Minimum class complexity | 3.00 |
▷ Maximum class complexity | 9.00 |
Average method complexity | 2.67 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 7.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 | 6 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 6 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 7 | |
▷ Global constants | 2 | 28.57% |
▷ Class constants | 5 | 71.43% |
▷ Public constants | 5 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin