Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
- Install procedure had errors
- > Deprecated in wp-content/plugins/thai-lottery-widget/thailottery.php+373
Function create_function() is deprecated
Server metrics [RAM: ▼1.82MB] [CPU: ▼52.90ms] Passed 4 tests
Analyzing server-side resources used by Thai Lottery Widget
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.17 ▼1.30 | 5.32 ▼34.93 |
Dashboard /wp-admin | 2.19 ▼1.12 | 6.62 ▼45.37 |
Posts /wp-admin/edit.php | 2.19 ▼1.17 | 6.69 ▼40.59 |
Add New Post /wp-admin/post-new.php | 2.19 ▼3.70 | 6.43 ▼90.69 |
Media Library /wp-admin/upload.php | 2.19 ▼1.04 | 5.17 ▼29.42 |
Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 10 new options
New WordPress options |
---|
can_compress_scripts |
widget_wp_thailottery_plugin4 |
widget_recent-comments |
widget_theysaidso_widget |
widget_wp_thailottery_plugin3 |
db_upgraded |
widget_wp_thailottery_plugin2 |
widget_wp_thailottery_plugin |
widget_recent-posts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
Checking browser requirements for Thai Lottery Widget
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲65 | 14.48 ▲0.10 | 1.74 ▼0.22 | 37.05 ▼9.94 |
Dashboard /wp-admin | 2,206 ▲18 | 4.85 ▼1.06 | 107.44 ▲0.57 | 41.50 ▲4.57 |
Posts /wp-admin/edit.php | 2,092 ▼0 | 2.01 ▼0.04 | 39.37 ▼1.41 | 33.96 ▼3.02 |
Add New Post /wp-admin/post-new.php | 1,528 ▼5 | 18.46 ▼4.78 | 606.16 ▼137.05 | 57.35 ▲9.39 |
Media Library /wp-admin/upload.php | 1,388 ▼3 | 4.24 ▲0.04 | 101.92 ▲3.96 | 44.87 ▲2.12 |
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
It is recommended to fix the following
- This plugin cannot be uninstalled
- > Deprecated in wp-content/plugins/thai-lottery-widget/thailottery.php+373
Function create_function() is deprecated
- This plugin does not fully uninstall, leaving 10 options in the database
- can_compress_scripts
- widget_recent-posts
- widget_wp_thailottery_plugin
- widget_wp_thailottery_plugin2
- widget_recent-comments
- widget_theysaidso_widget
- db_upgraded
- widget_wp_thailottery_plugin3
- widget_wp_thailottery_plugin4
- theysaidso_admin_options
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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
- 1× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/thai-lottery-widget/thailottery.php:13
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 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
5 plugin tags: lottery, lotto, glo, thai lottery, lottery widget
thai-lottery-widget/thailottery.php 85% from 13 tests
The primary PHP file in "Thai Lottery Widget" version 2.3 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("thai-lottery-widget.php" instead of "thailottery.php")
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 1068 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected341 lines of code in 1 file:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 13 | 28 | 341 |
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.10 |
Average class complexity | 5.00 |
▷ Minimum class complexity | 5.00 |
▷ Maximum class complexity | 5.00 |
Average method complexity | 2.00 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 4.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 4 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 16 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 16 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 5 | |
▷ Named functions | 5 | 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
PNG images were not found in this plugin