Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully
Server metrics [RAM: ▲0.01MB] [CPU: ▼5.17ms] Passed 4 tests
This is a short check of server-side resources used by Golden Ticket
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.03 | 43.54 ▲4.06 |
Dashboard /wp-admin | 3.32 ▲0.01 | 43.89 ▼3.40 |
Posts /wp-admin/edit.php | 3.37 ▲0.01 | 45.37 ▼4.01 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.01 | 79.63 ▼12.64 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 35.59 ▼0.62 |
Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_recent-posts |
widget_theysaidso_widget |
widget_recent-comments |
can_compress_scripts |
db_upgraded |
Browser metrics Passed 4 tests
An overview of browser requirements for Golden Ticket
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,894 ▲159 | 14.00 ▼0.28 | 5.32 ▲3.21 | 42.63 ▼10.14 |
Dashboard /wp-admin | 2,224 ▲36 | 4.93 ▲0.04 | 102.95 ▼12.17 | 83.34 ▲36.82 |
Posts /wp-admin/edit.php | 2,121 ▲32 | 2.25 ▲0.25 | 41.23 ▲5.02 | 36.25 ▲0.19 |
Add New Post /wp-admin/post-new.php | 1,544 ▲15 | 18.41 ▼4.69 | 631.45 ▼48.96 | 65.02 ▲13.91 |
Media Library /wp-admin/upload.php | 1,413 ▲25 | 4.24 ▲0.04 | 96.84 ▲1.06 | 71.19 ▲29.25 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_recent-posts
- can_compress_scripts
- widget_recent-comments
- theysaidso_admin_options
- db_upgraded
- widget_theysaidso_widget
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 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 take a closer look at the following
- 5× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/golden-ticket/admin_functions.php:10
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/golden-ticket/admin_functions.php on line 9
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/golden-ticket/admin_functions.php:10
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/golden-ticket/admin_functions.php on line 9
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/golden-ticket/index.php:284
- > 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 on the user side
Optimizations
Plugin configuration 96% 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: promotion, seo, giveaways, coupon, rewards
golden-ticket/index.php 92% from 13 tests
"Golden Ticket" version 1.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("golden-ticket.php" instead of "index.php")
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
There were no executable files found in this plugin647 lines of code in 5 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 3 | 154 | 45 | 610 |
JavaScript | 2 | 7 | 3 | 37 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.32 |
Average class complexity | 30.00 |
▷ Minimum class complexity | 30.00 |
▷ Maximum class complexity | 30.00 |
Average method complexity | 3.64 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 9.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 12 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 12 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 1 | 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
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/ticket-icon-16.png | 3.47KB | 0.79KB | ▼ 77.30% |
images/ThePluginFactoryLogo.png | 9.95KB | 4.77KB | ▼ 51.99% |
images/ticket-icon.png | 3.91KB | 2.38KB | ▼ 39.27% |
images/ticket-add-on-icon-16.png | 0.77KB | 0.86KB | 0.00% |