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.11MB] [CPU: ▼306.80ms] Passed 4 tests
A check of server-side resources used by Promotion Slider
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.80 ▲0.28 | 58.64 ▼2.06 |
Dashboard /wp-admin | 3.48 ▲0.07 | 24.76 ▼16.39 |
Posts /wp-admin/edit.php | 3.60 ▼0.04 | 29.49 ▼10.14 |
Add New Post /wp-admin/post-new.php | 6.26 ▼0.71 | 83.91 ▼1,198.62 |
Media Library /wp-admin/upload.php | 3.54 ▲0.25 | 23.45 ▼1.11 |
Sliders /wp-admin/edit-tags.php?taxonomy=promotion-categories&post_type=ps_promotion | 3.47 | 33.65 |
Add New Promotion /wp-admin/post-new.php?post_type=ps_promotion | 3.77 | 40.11 |
Promotions /wp-admin/edit.php?post_type=ps_promotion | 3.58 | 25.57 |
Slider Options /wp-admin/edit.php?post_type=ps_promotion&page=options | 3.46 | 21.98 |
Server storage [IO: ▲0.21MB] [DB: ▲0.01MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 27 new files
Database: no new tables, 1 new option
New WordPress options |
---|
promotion_slider_options |
Browser metrics Passed 4 tests
Checking browser requirements for Promotion Slider
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,966 ▲224 | 15.67 ▼0.11 | 9.22 ▲1.82 | 2.69 ▲0.52 |
Dashboard /wp-admin | 2,939 ▲81 | 6.03 ▼0.16 | 124.12 ▼12.60 | 169.60 ▲1.92 |
Posts /wp-admin/edit.php | 2,735 ▲44 | 3.24 ▼0.01 | 64.24 ▼2.32 | 146.10 ▼5.95 |
Add New Post /wp-admin/post-new.php | 1,690 ▼27 | 16.65 ▼4.94 | 420.46 ▼53.00 | 159.11 ▲3.55 |
Media Library /wp-admin/upload.php | 1,745 ▲50 | 5.48 ▼0.01 | 141.97 ▼21.22 | 214.92 ▲15.99 |
Sliders /wp-admin/edit-tags.php?taxonomy=promotion-categories&post_type=ps_promotion | 1,759 | 2.78 | 55.87 | 110.55 |
Add New Promotion /wp-admin/post-new.php?post_type=ps_promotion | 3,465 | 10.20 | 210.79 | 224.20 |
Promotions /wp-admin/edit.php?post_type=ps_promotion | 1,566 | 3.18 | 64.92 | 153.16 |
Slider Options /wp-admin/edit.php?post_type=ps_promotion&page=options | 1,857 | 2.52 | 66.77 | 168.20 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 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 did not uninstall successfully, leaving 1 option in the database
- promotion_slider_options
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
- 4 occurences, only the last one shown
- > GET request to /wp-admin/edit.php?post_type=ps_promotion&page=options
- > User deprecated in wp-includes/functions.php+5691
contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.
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
The following issues need your attention
- 8× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/promotion-slider/includes/functions.php:14
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/promotion-slider/index.php:28
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/promotion-slider/includes/help.slider_options.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/promotion-slider/includes/help.categories.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/promotion-slider/includes/help.promotions.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/promotion-slider/includes/options_page.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/promotion-slider/includes/help.add_new_promotion.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/promotion-slider/includes/meta_box.php:3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found
Optimizations
Plugin configuration 90% 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:
- Tags: There are too many tags (25 tag instead of maximum 10)
promotion-slider/index.php 85% from 13 tests
Analyzing the main PHP file in "Promotion Slider" version 3.3.4
Please make the necessary changes and fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("promotion-slider.php" instead of "index.php")
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 349 characters long)
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
Success! There were no dangerous files found in this plugin1,450 lines of code in 19 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 15 | 290 | 338 | 1,205 |
JavaScript | 1 | 46 | 33 | 120 |
CSS | 2 | 6 | 11 | 114 |
HTML | 1 | 10 | 0 | 11 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.36 |
Average class complexity | 21.12 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 102.00 |
Average method complexity | 3.06 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 23.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 8 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 8 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 78 | |
▷ Static methods | 28 | 35.90% |
▷ Public methods | 54 | 69.23% |
▷ Protected methods | 20 | 25.64% |
▷ Private methods | 4 | 5.13% |
Functions | 6 | |
▷ Named functions | 6 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 5 | |
▷ Global constants | 5 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
css/images/nav.png | 11.40KB | 6.12KB | ▼ 46.26% |
css/images/title.png | 45.60KB | 22.40KB | ▼ 50.87% |
css/images/next.png | 1.02KB | 0.89KB | ▼ 12.43% |
css/images/prev.png | 1.02KB | 0.89KB | ▼ 12.54% |
css/images/slide.png | 1.60KB | 0.84KB | ▼ 47.71% |