Benchmarks
Plugin footprint 23% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
- Install procedure validation failed for this plugin
- > Deprecated in wp-content/plugins/contest/contest.php+714
Array and string offset access syntax with curly braces is deprecated
Server metrics [RAM: ▼1.60MB] [CPU: ▼57.55ms] Passed 4 tests
This is a short check of server-side resources used by Contest
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.40 ▼1.06 | 5.16 ▼39.21 |
Dashboard /wp-admin | 2.42 ▼0.93 | 6.91 ▼55.23 |
Posts /wp-admin/edit.php | 2.42 ▼0.94 | 7.76 ▼43.92 |
Add New Post /wp-admin/post-new.php | 2.42 ▼3.47 | 6.87 ▼91.85 |
Media Library /wp-admin/upload.php | 2.42 ▼0.81 | 8.17 ▼26.22 |
Settings /wp-admin/admin.php?page=contest-settings | 2.42 | 6.61 |
Contest List /wp-admin/admin.php?page=contest-admin-list | 2.42 | 9.06 |
/wp-admin/admin.php?page=contest-admin | 2.42 | 6.54 |
All Contests /wp-admin/edit.php?post_type=contest | 2.42 | 7.71 |
Add Contest /wp-admin/post-new.php?post_type=contest | 2.42 | 8.22 |
Server storage [IO: ▲0.24MB] [DB: ▲0.01MB] Passed 3 tests
Filesystem and database footprint
This plugin was installed successfully
Filesystem: 31 new files
Database: 2 new tables, 7 new options
New tables |
---|
wp_contest_entry |
wp_contest |
New WordPress options |
---|
widget_contest |
db_upgraded |
theysaidso_admin_options |
can_compress_scripts |
widget_recent-comments |
widget_theysaidso_widget |
widget_recent-posts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Contest
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,878 ▲117 | 14.47 ▲0.11 | 2.26 ▲0.37 | 39.42 ▼3.68 |
Dashboard /wp-admin | 2,279 ▲76 | 4.88 ▼0.97 | 114.75 ▼4.16 | 43.09 ▲0.68 |
Posts /wp-admin/edit.php | 2,158 ▲58 | 2.03 ▼0.02 | 41.81 ▲4.60 | 36.29 ▼0.23 |
Add New Post /wp-admin/post-new.php | 1,581 ▲28 | 23.09 ▲0.11 | 663.52 ▲23.29 | 54.96 ▼1.41 |
Media Library /wp-admin/upload.php | 1,452 ▲49 | 4.24 ▲0.06 | 103.57 ▼3.39 | 45.84 ▼0.72 |
Settings /wp-admin/admin.php?page=contest-settings | 1,542 | 2.21 | 24.01 | 34.48 |
Contest List /wp-admin/admin.php?page=contest-admin-list | 848 | 2.03 | 25.07 | 28.10 |
/wp-admin/admin.php?page=contest-admin | 963 | 2.02 | 22.13 | 30.33 |
All Contests /wp-admin/edit.php?post_type=contest | 1,131 | 1.94 | 30.97 | 31.98 |
Add Contest /wp-admin/post-new.php?post_type=contest | 3,030 | 7.63 | 172.47 | 67.07 |
Uninstaller [IO: ▲0.24MB] [DB: ▲0.00MB] 25% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attentionZombie WordPress options detected upon uninstall: 8 options
- Uninstall procedure had uncaught errors
- > Deprecated in wp-content/plugins/contest/contest.php+714
Array and string offset access syntax with curly braces is deprecated
- This plugin has failed uninstalling correctly, leaving 31 files (0.24MB) in the plugin directory
- (new file) assets/screenshot-1.png
- (new file) contest_entry_trans.php
- (new file) readme.txt
- (new file) ContestUser.php
- (new file) css/contest.css
- (new file) contest_install.php
- (new file) contest_admin_trans.php
- (new file) js/contest.js
- (new file) contest.php
- (new file) ContestBlock.php
- ...
- theysaidso_admin_options
- widget_recent-posts
- recovery_mode_email_last_sent
- can_compress_scripts
- widget_theysaidso_widget
- widget_contest
- widget_recent-comments
- db_upgraded
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
- 6 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=contest
- > Deprecated in wp-content/plugins/contest/contest.php+714
Array and string offset access syntax with curly braces is deprecated
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=contest-admin
- > Warning in wp-content/plugins/contest/templates/contest-admin.tpl.php+82
date() expects parameter 2 to be int, string given
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 take a closer look at the following
- 2× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/contest/templates/contest-date.tpl.php
- > /wp-content/plugins/contest/templates/contest-state.tpl.php
- 61× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Notice
Undefined variable: months in wp-content/plugins/contest/templates/contest-date.tpl.php on line 21
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/contest/ContestBlock.php:11
- > PHP Warning
Use of undefined constant WP_DEBUG - assumed 'WP_DEBUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/contest/templates/contest-block-view.tpl.php on line 29
- > PHP Notice
Undefined variable: field_name in wp-content/plugins/contest/templates/contest-date.tpl.php on line 39
- > PHP Notice
Undefined variable: states in wp-content/plugins/contest/templates/contest-state.tpl.php on line 15
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/contest/templates/contest-state.tpl.php on line 15
- > PHP Warning
Use of undefined constant WP_DEBUG - assumed 'WP_DEBUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/contest/templates/contest-date.tpl.php on line 15
- > PHP Notice
Undefined variable: field_name in wp-content/plugins/contest/templates/contest-date.tpl.php on line 29
- > PHP Notice
Undefined variable: field_name in wp-content/plugins/contest/templates/contest-date.tpl.php on line 19
- > PHP Fatal error
Uncaught Error: Call to undefined function get_permalink() in wp-content/plugins/contest/templates/contest-admin.tpl.php:55
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
- Screenshots: Add an image for screenshot #1 (Create random drawings for prizes.)
contest/contest.php Passed 13 tests
The main PHP file in "Contest" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
86 characters long description:
Allows your site to host a sweepstakes, (contestants win prizes via a random drawing).
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 detected2,148 lines of code in 29 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 27 | 246 | 783 | 1,890 |
CSS | 1 | 0 | 1 | 194 |
JavaScript | 1 | 19 | 69 | 64 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.39 |
Average class complexity | 50.50 |
▷ Minimum class complexity | 10.00 |
▷ Maximum class complexity | 91.00 |
Average method complexity | 7.19 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 38.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 16 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 12 | 75.00% |
▷ Protected methods | 4 | 25.00% |
▷ Private methods | 0 | 0.00% |
Functions | 65 | |
▷ Named functions | 65 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 15 | |
▷ Global constants | 4 | 26.67% |
▷ Class constants | 11 | 73.33% |
▷ Public constants | 11 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.12MB with 0.08MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/screenshot-1.png | 123.08KB | 43.19KB | ▼ 64.91% |