Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.09MB] [CPU: ▼7.30ms] Passed 4 tests
Server-side resources used by AmaDiscount Plugin
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.57 ▲0.11 | 44.23 ▲3.42 |
Dashboard /wp-admin | 3.41 ▲0.06 | 50.83 ▼12.83 |
Posts /wp-admin/edit.php | 3.46 ▲0.10 | 48.80 ▼2.48 |
Add New Post /wp-admin/post-new.php | 5.99 ▲0.10 | 92.94 ▼8.78 |
Media Library /wp-admin/upload.php | 3.33 ▲0.10 | 35.58 ▼5.12 |
AmaDiscount Config /wp-admin/admin.php?page=adp_config | 3.31 | 34.21 |
AmaDiscount Search /wp-admin/admin.php?page=adp_search | 3.34 | 36.84 |
Server storage [IO: ▲0.52MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 20 new files
Database: 3 new tables, 6 new options
New tables |
---|
wp_adp_config |
wp_adp_search |
wp_adp_result |
New WordPress options |
---|
widget_theysaidso_widget |
db_upgraded |
widget_recent-comments |
can_compress_scripts |
theysaidso_admin_options |
widget_recent-posts |
Browser metrics Passed 4 tests
An overview of browser requirements for AmaDiscount Plugin
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,844 ▲83 | 13.26 ▼1.10 | 1.66 ▼0.10 | 43.37 ▼2.20 |
Dashboard /wp-admin | 2,250 ▲43 | 5.86 ▲0.90 | 109.62 ▲0.99 | 46.59 ▲7.25 |
Posts /wp-admin/edit.php | 2,126 ▲26 | 2.05 ▼0.01 | 35.62 ▼4.60 | 34.63 ▼3.18 |
Add New Post /wp-admin/post-new.php | 1,564 ▲33 | 23.24 ▼0.04 | 639.68 ▼21.62 | 51.43 ▼3.03 |
Media Library /wp-admin/upload.php | 1,429 ▲29 | 4.22 ▼0.03 | 96.97 ▼6.74 | 44.12 ▼0.44 |
AmaDiscount Config /wp-admin/admin.php?page=adp_config | 913 | 2.05 | 23.72 | 30.21 |
AmaDiscount Search /wp-admin/admin.php?page=adp_search | 1,173 | 2.27 | 50.72 | 32.71 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
- Zombie tables detected upon uninstall: 3 tables
- wp_adp_search
- wp_adp_result
- wp_adp_config
- This plugin did not uninstall successfully, leaving 6 options in the database
- theysaidso_admin_options
- can_compress_scripts
- widget_theysaidso_widget
- db_upgraded
- widget_recent-comments
- widget_recent-posts
Smoke tests 25% 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 server-side errors were triggered
- > GET request to /wp-admin/admin.php?page=adp_search
- > POST request to /wp-admin/admin-ajax.php
- > Notice in wp-content/plugins/amadiscount/adp_functions.php+209
Trying to get property 'country_code' of non-object
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=adp_search
- > POST request to /wp-admin/admin-ajax.php
- > Warning in wp-content/plugins/amadiscount/adp_functions.php+259
file_get_contents(http://docs.aws.amazon.com/AWSECommerceService/latest/DG/LocaleUS.html): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden
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
- 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/amadiscount/adp_search.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/amadiscount/adp_functions.php:15
- > PHP Warning
Use of undefined constant adp_TABLE_PREFIX - assumed 'adp_TABLE_PREFIX' (this will throw an Error in a future version of PHP) in wp-content/plugins/amadiscount/adp_config.php on line 38
- > PHP Fatal error
Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/amadiscount/adp_config.php:39
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
- > GET request to /wp-admin/admin.php?page=adp_search
- > Network (severe)
wp-content/plugins/amadiscount/images/ui-bg_flat_75_ffffff_40x100.png - Failed to load resource: the server responded with a status of 404 (Not Found)
- > GET request to /wp-admin/admin.php?page=adp_search
- > Network (severe)
wp-content/plugins/amadiscount/images/ui-bg_highlight-soft_75_cccccc_1x100.png - Failed to load resource: the server responded with a status of 404 (Not Found)
- > GET request to /wp-admin/admin.php?page=adp_search
- > Network (severe)
wp-content/plugins/amadiscount/images/ui-bg_glass_75_e6e6e6_1x400.png - Failed to load resource: the server responded with a status of 404 (Not Found)
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=adp_search
- > Javascript (severe) in unknown
/wp-admin/admin.php?page=adp_search 257:39 Uncaught TypeError: Cannot read properties of undefined (reading 'cat')
- > GET request to /wp-admin/admin.php?page=adp_search
- > Network (severe)
http://pluginhandy.com/amazondiscount/wp-content/uploads/2015/10/Screen-Shot-2015-10-10-at-12.25.30.png - Failed to load resource: the server responded with a status of 403 (Forbidden)
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
- Tags: You are using too many tags: 12 tag instead of maximum 10
amadiscount/adp_functions.php 85% from 13 tests
The main file in "AmaDiscount Plugin" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("amadiscount.php" instead of "adp_functions.php")
- Text Domain: The text domain name should consist of only dashes and lowercase characters
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin2,330 lines of code in 5 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 2 | 35 | 50 | 1,255 |
PHP | 3 | 60 | 130 | 1,075 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.22 |
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 | 20 | |
▷ Named functions | 20 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 2 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
10 PNG files occupy 0.41MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/canada.png | 0.69KB | 0.98KB | 0.00% |
images/adp.png | 213.42KB | 63.15KB | ▼ 70.41% |
images/keyword.png | 2.66KB | 1.48KB | ▼ 44.27% |
images/search_logo.png | 168.03KB | 58.22KB | ▼ 65.35% |
images/price.png | 4.77KB | 2.07KB | ▼ 56.58% |