Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
- The plugin cannot be installed
- > Warning in wp-content/plugins/current-promotions-display/current_promotions_display.php+12
Use of undefined constant CUSTOM_PLAN_POST_TYPE - assumed 'CUSTOM_PLAN_POST_TYPE' (this will throw an Error in a future version of PHP)
Server metrics [RAM: ▼1.91MB] [CPU: ▼57.35ms] Passed 4 tests
A check of server-side resources used by Current Promotions Display
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.09 ▼1.38 | 4.67 ▼37.83 |
Dashboard /wp-admin | 2.11 ▼1.24 | 5.82 ▼62.00 |
Posts /wp-admin/edit.php | 2.11 ▼1.25 | 6.04 ▼42.31 |
Add New Post /wp-admin/post-new.php | 2.11 ▼3.78 | 6.77 ▼87.25 |
Media Library /wp-admin/upload.php | 2.11 ▼1.12 | 6.59 ▼26.79 |
All Pages /wp-admin/edit.php?post_type=thankyou_page | 2.11 | 6.03 |
Add New /wp-admin/post-new.php?post_type=thankyou_page | 2.11 | 8.59 |
Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
widget_recent-comments |
widget_recent-posts |
can_compress_scripts |
widget_theysaidso_widget |
theysaidso_admin_options |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Current Promotions Display
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,819 ▲58 | 14.38 ▼0.25 | 1.74 ▼0.21 | 44.20 ▲5.51 |
Dashboard /wp-admin | 2,225 ▲48 | 5.64 ▲0.05 | 84.26 ▼18.16 | 44.64 ▲1.13 |
Posts /wp-admin/edit.php | 2,130 ▲30 | 1.99 ▼0.03 | 37.51 ▼1.28 | 34.66 ▼2.11 |
Add New Post /wp-admin/post-new.php | 1,549 ▲16 | 23.01 ▲0.13 | 678.02 ▲27.04 | 50.24 ▼5.46 |
Media Library /wp-admin/upload.php | 1,427 ▲27 | 4.29 ▲0.08 | 97.03 ▼8.01 | 49.61 ▲3.07 |
All Pages /wp-admin/edit.php?post_type=thankyou_page | 1,100 | 1.96 | 30.69 | 29.56 |
Add New /wp-admin/post-new.php?post_type=thankyou_page | 2,259 | 7.72 | 175.16 | 63.39 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
- This plugin cannot be uninstalled
- > Warning in wp-content/plugins/current-promotions-display/current_promotions_display.php+12
Use of undefined constant CUSTOM_PLAN_POST_TYPE - assumed 'CUSTOM_PLAN_POST_TYPE' (this will throw an Error in a future version of PHP)
- The uninstall procedure has failed, leaving 6 options in the database
- widget_theysaidso_widget
- can_compress_scripts
- theysaidso_admin_options
- db_upgraded
- widget_recent-comments
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
- 3 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=thankyou_page
- > Warning in wp-content/plugins/current-promotions-display/current_promotions_display.php+12
Use of undefined constant CUSTOM_PLAN_POST_TYPE - assumed 'CUSTOM_PLAN_POST_TYPE' (this will throw an Error in a future version of PHP)
SRP 50% 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
Almost there! Just fix the following items
- 3× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_header() in wp-content/plugins/current-promotions-display/promotionTemplate.php:7
- > PHP Warning
Use of undefined constant CUSTOM_PLAN_POST_TYPE - assumed 'CUSTOM_PLAN_POST_TYPE' (this will throw an Error in a future version of PHP) in wp-content/plugins/current-promotions-display/current_promotions_display.php on line 12
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/current-promotions-display/current_promotions_display.php:15
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: promotions, thank you page, sell offers, plan promoter, promotion display...
current-promotions-display/current_promotions_display.php 85% from 13 tests
The main PHP script in "Current Promotions Display" version 1.1 is automatically included on every request by WordPress
Please take the time to fix the following:
- Description: The description should be shorter than 140 characters (currently 261 characters long)
- Main file name: Name the main plugin file the same as the plugin slug ("current-promotions-display.php" instead of "current_promotions_display.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin152 lines of code in 2 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 53 | 97 | 152 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
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 | 9 | |
▷ Named functions | 9 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 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
There were not PNG files found in your plugin