Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully
Server metrics [RAM: ▼0.01MB] [CPU: ▼4.62ms] Passed 4 tests
Server-side resources used by Digital Lottery
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 38.97 ▼0.62 |
Dashboard /wp-admin | 3.31 ▼0.04 | 44.16 ▼17.86 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 48.82 ▲0.59 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 88.96 ▲0.10 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 33.16 ▼0.11 |
Server storage [IO: ▲1.01MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 130 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
theysaidso_admin_options |
db_upgraded |
widget_theysaidso_widget |
widget_recent-comments |
widget_recent-posts |
Browser metrics Passed 4 tests
A check of browser resources used by Digital Lottery
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,815 ▲68 | 14.54 ▲0.16 | 2.09 ▲0.49 | 44.38 ▲5.53 |
Dashboard /wp-admin | 2,198 ▲20 | 5.63 ▼0.06 | 89.56 ▼20.90 | 43.25 ▲0.44 |
Posts /wp-admin/edit.php | 2,103 ▲3 | 1.94 ▼0.00 | 43.26 ▲2.59 | 40.93 ▲4.00 |
Add New Post /wp-admin/post-new.php | 1,526 ▼0 | 23.33 ▲0.04 | 645.43 ▼34.31 | 49.24 ▼7.69 |
Media Library /wp-admin/upload.php | 1,403 ▲9 | 4.20 ▲0.04 | 98.43 ▼4.09 | 41.47 ▼2.29 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_theysaidso_widget
- db_upgraded
- widget_recent-posts
- can_compress_scripts
- theysaidso_admin_options
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected
SRP 0% 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
- 4× PHP files output text when accessed directly:
- > /wp-content/plugins/digital-lottery/templates/content-single-entry.php
- > /wp-content/plugins/digital-lottery/templates/order/ticket.php
- > /wp-content/plugins/digital-lottery/public/partials/digital-lottery-public-display.php
- > /wp-content/plugins/digital-lottery/templates/order/order-details-customer.php
- 16× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/digital-lottery/admin/partials/digital-lottery-packages.php:9
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/digital-lottery/includes/functions.php:140
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/digital-lottery/public/class-digital-lottery-entry-list-tables.php on line 4
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/digital-lottery/includes/hooks.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/digital-lottery/admin/partials/html-product-lottery-answers.php:1
- > PHP Fatal error
Uncaught Error: Class 'WC_Shortcodes' not found in wp-content/plugins/digital-lottery/public/class-digital-lottery-shortcodes.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/digital-lottery/templates/myaccount/form-registration.php:2
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/digital-lottery/public/class-digital-lottery-entry-list-tables.php on line 4
- > PHP Fatal error
Uncaught Error: Call to undefined function woocommerce_wp_textarea_input() in wp-content/plugins/digital-lottery/admin/partials/html-meta-box-answers.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/digital-lottery/includes/single-product-hooks.php:22
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
- Requires php: Invalid plugin version format
digital-lottery/digital-lottery.php 92% from 13 tests
The main PHP file in "Digital Lottery" ver. 3.0.2 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
- Requires PHP: Required version number formatted incorrectly (ex. "7.0" instead of "7.4 or greater")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin12,329 lines of code in 114 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 93 | 1,398 | 2,577 | 8,339 |
PO File | 2 | 708 | 1,072 | 1,687 |
JavaScript | 14 | 147 | 139 | 1,500 |
CSS | 5 | 78 | 47 | 803 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.41 |
Average class complexity | 33.74 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 281.00 |
Average method complexity | 3.70 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 74.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 1 | |
Classes | 26 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 26 | 100.00% |
▷ Final classes | 1 | 3.85% |
Methods | 327 | |
▷ Static methods | 21 | 6.42% |
▷ Public methods | 282 | 86.24% |
▷ Protected methods | 39 | 11.93% |
▷ Private methods | 6 | 1.83% |
Functions | 56 | |
▷ Named functions | 55 | 98.21% |
▷ Anonymous functions | 1 | 1.79% |
Constants | 3 | |
▷ Global constants | 2 | 66.67% |
▷ Class constants | 1 | 33.33% |
▷ Public constants | 1 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/js/DataTables/images/sort_asc_disabled.png | 0.14KB | 0.25KB | 0.00% |
admin/js/DataTables/images/sort_desc_disabled.png | 0.14KB | 0.25KB | 0.00% |
admin/js/DataTables/images/sort_asc.png | 0.16KB | 0.25KB | 0.00% |
admin/js/DataTables/images/sort_desc.png | 0.15KB | 0.25KB | 0.00% |
admin/js/DataTables/images/sort_both.png | 0.20KB | 0.29KB | 0.00% |