Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.11MB] [CPU: ▼139.31ms] Passed 4 tests
This is a short check of server-side resources used by WP Promotions
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.95 ▲0.11 | 42.18 ▲9.44 |
Dashboard /wp-admin | 3.17 ▲0.11 | 54.51 ▲8.93 |
Posts /wp-admin/edit.php | 3.28 ▲0.17 | 52.89 ▲6.24 |
Add New Post /wp-admin/post-new.php | 5.53 ▲0.09 | 96.09 ▼573.86 |
Media Library /wp-admin/upload.php | 3.11 ▲0.11 | 37.27 ▲1.45 |
Add New /wp-admin/post-new.php?post_type=promotion | 3.30 | 57.74 |
All Promotions /wp-admin/edit.php?post_type=promotion | 3.15 | 34.57 |
category /wp-admin/edit-tags.php?taxonomy=promotion_category&post_type=promotion | 3.11 | 32.26 |
Server storage [IO: ▲0.10MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin was installed successfully
Filesystem: 28 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
A check of browser resources used by WP Promotions
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,869 ▲273 | 16.36 ▲0.50 | 20.87 ▲11.08 | 49.98 ▲1.63 |
Dashboard /wp-admin | 3,025 ▲88 | 5.93 ▼0.02 | 147.37 ▼20.17 | 115.96 ▲6.34 |
Posts /wp-admin/edit.php | 2,794 ▲55 | 2.72 ▲0.01 | 65.81 ▼8.06 | 101.35 ▼35.76 |
Add New Post /wp-admin/post-new.php | 1,719 ▲36 | 18.32 ▼0.39 | 399.81 ▼38.52 | 109.00 ▼6.16 |
Media Library /wp-admin/upload.php | 1,800 ▼7 | 5.04 ▲0.02 | 179.63 ▲19.35 | 120.88 ▲3.81 |
Add New /wp-admin/post-new.php?post_type=promotion | 3,477 | 8.98 | 276.40 | 157.32 |
All Promotions /wp-admin/edit.php?post_type=promotion | 1,511 | 2.65 | 63.08 | 79.98 |
category /wp-admin/edit-tags.php?taxonomy=promotion_category&post_type=promotion | 1,794 | 2.38 | 65.32 | 80.71 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables
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 everything seems fine, this is not 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
The following issues need your attention
- 18× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-promotions/shortcodes/promotion-profile.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function wpp_get_template_part() in wp-content/plugins/wp-promotions/templates/edit-promotion.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function get_site_url() in wp-content/plugins/wp-promotions/templates/signup.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-promotions/shortcodes/promotion-profile.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-promotions/functions/functions.php:4
- > PHP Fatal error
Uncaught Error: Call to undefined function wpp_create_links() in wp-content/plugins/wp-promotions/templates/parts/main-menu.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-promotions/shortcodes/edit-promotion.php:21
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-promotions/shortcodes/view-promotion.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-promotions/shortcodes/submit-promotion.php:17
- > PHP Fatal error
Uncaught Error: Call to undefined function wpp_save_options() in wp-content/plugins/wp-promotions/admin/main-options.php:3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
- Tags: Please delete some tags, you are using 12 tag instead of maximum 10
wp-promotions/wp-promo.php 92% from 13 tests
The main PHP file in "WP Promotions" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("wp-promotions.php" instead of "wp-promo.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected1,306 lines of code in 25 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 22 | 270 | 151 | 740 |
CSS | 2 | 42 | 59 | 465 |
JavaScript | 1 | 20 | 10 | 101 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.26 |
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 | 31 | |
▷ Named functions | 31 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 6 | |
▷ Global constants | 6 | 100.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
There are no PNG files in this plugin