Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.26MB] [CPU: ▼3.76ms] Passed 4 tests
An overview of server-side resources used by Sweepstakes
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.72 ▲0.26 | 35.66 ▼0.77 |
Dashboard /wp-admin | 3.56 ▲0.26 | 45.18 ▼5.02 |
Posts /wp-admin/edit.php | 3.67 ▲0.32 | 48.39 ▼0.71 |
Add New Post /wp-admin/post-new.php | 6.15 ▲0.26 | 90.91 ▼8.53 |
Media Library /wp-admin/upload.php | 3.48 ▲0.26 | 35.26 ▲0.95 |
Add new promo /wp-admin/post-new.php?post_type=promo | 3.59 | 43.53 |
Promos /wp-admin/edit.php?post_type=promo | 3.52 | 36.14 |
Server storage [IO: ▲0.24MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
db_upgraded |
widget_theysaidso_widget |
widget_recent-posts |
theysaidso_admin_options |
can_compress_scripts |
Browser metrics Passed 4 tests
Sweepstakes: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,820 ▲59 | 14.37 ▼0.18 | 1.65 ▲0.10 | 42.07 ▲3.64 |
Dashboard /wp-admin | 2,220 ▲43 | 5.67 ▲0.07 | 92.64 ▲8.19 | 38.51 ▲1.64 |
Posts /wp-admin/edit.php | 2,135 ▲35 | 2.18 ▲0.17 | 38.77 ▲1.49 | 34.51 ▲0.16 |
Add New Post /wp-admin/post-new.php | 1,550 ▲24 | 23.11 ▼0.57 | 654.33 ▼10.76 | 40.46 ▼15.34 |
Media Library /wp-admin/upload.php | 1,431 ▲31 | 4.15 ▼0.12 | 99.60 ▼12.08 | 41.56 ▼5.35 |
Add new promo /wp-admin/post-new.php?post_type=promo | 2,592 | 7.78 | 168.27 | 66.38 |
Promos /wp-admin/edit.php?post_type=promo | 1,120 | 2.14 | 32.21 | 27.97 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
- Zombie WordPress options were found after uninstall: 6 options
- can_compress_scripts
- db_upgraded
- widget_theysaidso_widget
- widget_recent-comments
- widget_recent-posts
- theysaidso_admin_options
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
- > GET request to /wp-admin/post-new.php?post_type=promo
- > Notice in wp-content/plugins/sweepstakes/sweepstakes.php+515
Undefined index: terms
- > GET request to /wp-admin/post-new.php?post_type=promo
- > Notice in wp-content/plugins/sweepstakes/sweepstakes.php+547
Undefined index: winners
- > GET request to /wp-admin/post-new.php?post_type=promo
- > Warning in wp-content/plugins/sweepstakes/sweepstakes.php+547
Invalid argument supplied for foreach()
- 2 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=promo
- > Warning in wp-content/plugins/sweepstakes/sweepstakes.php+593
count(): Parameter must be an array or an object that implements Countable
SRP 50% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
- 1× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sweepstakes/sweepstakes.php:48
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
- > GET request to /wp-admin/post-new.php?post_type=promo
- > Console-api (warning) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-mouse,jquery-ui-sortable,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/sweepstakes/assets/js/admin-scripts.js:98:23)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-mouse,jquery-ui-sortable,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-mouse,jquery-ui-sortable,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
- > GET request to /wp-admin/post-new.php?post_type=promo
- > Javascript (severe) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-mouse,jquery-ui-sortable,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function
- > GET request to /wp-admin/edit.php?post_type=promo
- > Console-api (warning) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-mouse,jquery-ui-sortable,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/sweepstakes/assets/js/admin-scripts.js:98:23)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-mouse,jquery-ui-sortable,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-mouse,jquery-ui-sortable,utils&ver=6.3.1:2:27292)" undefined
- > GET request to /wp-admin/edit.php?post_type=promo
- > Javascript (severe) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,jquery-ui-core,jquery-ui-mouse,jquery-ui-sortable,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
- Screenshots: These screenshots require images: #1 (Custimoze Serial promo code), #2 (Customize Register form), #3 (Control participants list)
sweepstakes/sweepstakes.php Passed 13 tests
"Sweepstakes" version 0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
71 characters long description:
adds sweepstakes on site when users can register with a serialized code
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin1,532 lines of code in 7 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 443 | 368 | 948 |
PO File | 2 | 144 | 146 | 306 |
JavaScript | 2 | 46 | 40 | 173 |
CSS | 2 | 25 | 2 | 105 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.46 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 47 | |
▷ Named functions | 47 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 4 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.14MB with 0.09MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 38.83KB | 16.46KB | ▼ 57.62% |
screenshot-2.png | 37.66KB | 16.45KB | ▼ 56.33% |
screenshot-3.png | 70.76KB | 21.28KB | ▼ 69.93% |