Benchmarks
Plugin footprint 47% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.63MB] [CPU: ▼168.80ms] 75% from 4 tests
A check of server-side resources used by Amazon Link
Please fix the following
- CPU: You should keep total CPU usage under 500.00ms (currently 2,093.96ms on /wp-admin/admin.php?page=amazon-link-settings)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.15 ▲0.43 | 36.76 ▲13.76 |
Dashboard /wp-admin | 3.92 ▲0.87 | 50.46 ▲5.53 |
Posts /wp-admin/edit.php | 3.97 ▲0.86 | 48.18 ▲5.15 |
Add New Post /wp-admin/post-new.php | 5.86 ▲0.43 | 81.05 ▼687.25 |
Media Library /wp-admin/upload.php | 3.79 ▲0.79 | 34.87 ▲1.38 |
Settings /wp-admin/admin.php?page=amazon-link-settings | 3.86 | 2,093.96 |
Templates /wp-admin/admin.php?page=amazon-link-templates | 4.00 | 44.43 |
Setup /wp-admin/admin.php?page=amazon-link-quickstart | 3.92 | 289.72 |
Associate IDs /wp-admin/admin.php?page=amazon-link-channels | 3.83 | 33.26 |
Server storage [IO: ▲0.58MB] [DB: ▲0.01MB] Passed 3 tests
How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 71 new files
Database: no new tables, 3 new options
New WordPress options |
---|
AmazonLinkTemplates |
AmazonLinkOptions |
AmazonLinkChannels |
Browser metrics Passed 4 tests
Checking browser requirements for Amazon Link
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,748 ▲152 | 15.88 ▲0.22 | 10.15 ▲0.47 | 45.48 ▼1.59 |
Dashboard /wp-admin | 3,001 ▲67 | 5.93 ▼0.24 | 147.22 ▼17.76 | 120.97 ▲11.21 |
Posts /wp-admin/edit.php | 2,783 ▲44 | 2.60 ▼0.10 | 63.85 ▼10.87 | 95.21 ▲6.95 |
Add New Post /wp-admin/post-new.php | 2,459 ▲776 | 24.77 ▲5.98 | 414.48 ▲0.70 | 122.19 ▲12.02 |
Media Library /wp-admin/upload.php | 1,794 ▼13 | 5.01 ▼0.04 | 195.89 ▲13.80 | 135.32 ▲19.13 |
Settings /wp-admin/admin.php?page=amazon-link-settings | 4,039 | 2.92 | 80.51 | 163.47 |
Templates /wp-admin/admin.php?page=amazon-link-templates | 8,458 | 5.67 | 286.96 | 172.90 |
Setup /wp-admin/admin.php?page=amazon-link-quickstart | 2,846 | 2.82 | 75.01 | 124.27 |
Associate IDs /wp-admin/admin.php?page=amazon-link-channels | 2,359 | 2.77 | 71.68 | 123.34 |
Uninstaller [IO: ▲0.58MB] [DB: ▲0.01MB] 25% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the followingThe uninstall procedure has failed, leaving 4 options in the database
- Uninstall procedure validation failed for this plugin
- > Compile error in wp-content/plugins/amazon-link/amazon.php+1771
Cannot redeclare amazon_get_link() (previously declared in wp-content/plugins/amazon-link/amazon.php:1771)
- Incomplete uninstall procedure, leaving 71 files (0.58MB) in the plugin directory
- (new file) extras/amazon-link-references.php
- (new file) extras/amazon-link-spoof-locale.php
- (new file) extras/amazon-link-cache.php
- (new file) amazon.php
- (new file) amazon.js
- (new file) extras/amazon-link-convert.php
- (new file) Amazon.css
- (new file) extras/amazon-link-images.php
- (new file) extras/amazon-link-editorial.php
- (new file) extras/amazon-link-redirect.php
- ...
- AmazonLinkChannels
- recovery_mode_email_last_sent
- AmazonLinkTemplates
- AmazonLinkOptions
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected
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
Please fix the following
- 34× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/amazon-link/include/showRecommendations.php:110
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/amazon-link/include/showRecommendations.php on line 104
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/amazon-link/extras/amazon-link-spoof-locale.php:77
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/amazon-link/include/showDefaultTemplates.php:8
- > PHP Notice
Undefined variable: region in wp-content/plugins/amazon-link/include/awsRequest.php on line 36
- > PHP Fatal error
Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/amazon-link/amazon.php:1759
- > PHP Fatal error
Uncaught Error: Call to undefined function get_plugin_data() in wp-content/plugins/amazon-link/include/showInfo.php:2
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/amazon-link/include/showRecommendations.php on line 104
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/amazon-link/extras/amazon-link-convert.php:269
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/amazon-link/include/upgradeSettings.php:4
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
- 6 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=amazon-link-templates
- > Network (severe)
http://wms-eu.amazon-adsystem.com/20070822/GB/js/swfobject_1_5.js - Failed to load resource: the server responded with a status of 404 (Not Found)
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=amazon-link-templates
- > Javascript (warning) in unknown
http://wms-eu.amazon-adsystem.com/20070822/GB/js/AmazonWidgets.js 465 A parser-blocking, cross site (i.e. different eTLD+1) script, http://ws-eu.amazon-adsystem.com/widgets/q?MarketPlace=GB&Operation=MyFavorites&ServiceVersion=20070822&WS=1&ID=LStrings, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=amazon-link-templates
- > Javascript (warning) in unknown
http://wms-eu.amazon-adsystem.com/20070822/GB/js/AmazonWidgets.js 466 A parser-blocking, cross site (i.e. different eTLD+1) script, http://wms-eu.amazon-adsystem.com/panda/20070822/GB/js/8001_1.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=amazon-link-templates
- > Javascript (warning) in unknown
http://wms-eu.amazon-adsystem.com/panda/20070822/GB/js/8001_1.js 2086 A parser-blocking, cross site (i.e. different eTLD+1) script, http://wms-eu.amazon-adsystem.com/js/popup.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
- 3 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=amazon-link-templates
- > Javascript (warning) in unknown
http://wms-eu.amazon-adsystem.com/panda/20070822/GB/js/8001_1.js 2095 A parser-blocking, cross site (i.e. different eTLD+1) script, http://wms-eu.amazon-adsystem.com/js/nifty.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
- > GET request to /wp-admin/admin.php?page=amazon-link-templates
- > Javascript (warning) in unknown
http://wms-eu.amazon-adsystem.com/panda/20070822/GB/js/8001_1.js 2104 A parser-blocking, cross site (i.e. different eTLD+1) script, http://wms-eu.amazon-adsystem.com/js/colors.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
- > GET request to /wp-admin/admin.php?page=amazon-link-templates
- > Network (severe)
http://www.assoc-amazon.co.uk/e/ir?t=&l=as2&o=2&a=0893817449 - Failed to load resource: net::ERR_CONNECTION_REFUSED
- > GET request to /wp-admin/admin.php?page=amazon-link-templates
- > Network (severe)
http://unknown%20string/e/ir?o=2&t=amawid-21&l=wey - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
- > GET request to /wp-admin/admin.php?page=amazon-link-templates
- > Network (severe)
http://wms-eu.amazon-adsystem.com/GB/img/star44_tpng.png - Failed to load resource: the server responded with a status of 404 (Not Found)
- > GET request to /wp-admin/admin.php?page=amazon-link-templates
- > Network (severe)
http://wms-eu.amazon-adsystem.com/GB/img/star47_tpng.png - Failed to load resource: the server responded with a status of 404 (Not Found)
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
- Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
amazon-link/amazon.php 92% from 13 tests
Analyzing the main PHP file in "Amazon Link" version 3.2.10
The following require your attention:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("amazon-link.php" instead of "amazon.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin6,523 lines of code in 42 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 36 | 1,367 | 1,574 | 5,897 |
JavaScript | 4 | 77 | 25 | 414 |
CSS | 2 | 43 | 1 | 212 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.42 |
Average class complexity | 74.00 |
▷ Minimum class complexity | 4.00 |
▷ Maximum class complexity | 231.00 |
Average method complexity | 4.87 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 96.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 132 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 132 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 52 | |
▷ Named functions | 52 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 8 | |
▷ Global constants | 1 | 12.50% |
▷ Class constants | 7 | 87.50% |
▷ Public constants | 7 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
14 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/star_3_5.png | 1.40KB | 0.61KB | ▼ 56.53% |
images/star_0.png | 1.27KB | 0.44KB | ▼ 65.10% |
images/star_4.png | 1.38KB | 0.58KB | ▼ 58.00% |
images/star_2_5.png | 1.41KB | 0.63KB | ▼ 55.45% |
images/star_0_5.png | 0.58KB | 0.44KB | ▼ 25.00% |