Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▼0.86MB] [CPU: ▼183.30ms] Passed 4 tests
A check of server-side resources used by affiliate-amazon-block(aab)
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.74 ▲0.02 | 18.81 ▼1.52 |
Dashboard /wp-admin | 2.79 ▼0.27 | 16.93 ▼30.03 |
Posts /wp-admin/edit.php | 2.79 ▼0.32 | 16.73 ▼40.75 |
Add New Post /wp-admin/post-new.php | 2.79 ▼2.64 | 18.16 ▼650.35 |
Media Library /wp-admin/upload.php | 2.79 ▼0.21 | 19.97 ▼12.08 |
affiliate-amazon-block(aab) /wp-admin/options-general.php?page=amazonjs | 2.79 | 18.20 |
Server storage [IO: ▲0.60MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 54 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
Checking browser requirements for affiliate-amazon-block(aab)
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,685 ▲89 | 15.87 ▲0.19 | 11.87 ▲2.28 | 46.71 ▼3.81 |
Dashboard /wp-admin | 2,972 ▲62 | 5.89 ▼0.29 | 140.74 ▼28.44 | 110.20 ▼44.79 |
Posts /wp-admin/edit.php | 2,744 ▲5 | 2.73 ▲0.01 | 66.29 ▼6.18 | 86.15 ▼12.13 |
Add New Post /wp-admin/post-new.php | 1,627 ▲12 | 21.20 ▼0.22 | 338.38 ▲33.52 | 126.44 ▲20.26 |
Media Library /wp-admin/upload.php | 1,815 ▲8 | 5.05 ▲0.02 | 163.03 ▲6.32 | 118.26 ▲7.85 |
affiliate-amazon-block(aab) /wp-admin/options-general.php?page=amazonjs | 1,383 | 2.09 | 67.66 | 83.30 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
- The plugin did not uninstall gracefully
- > Notice in wp-content/plugins/affiliate-amazon-blockaab/lib/amazonjs/amazonjs.php+371
Undefined index: defaults
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
- 18 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=amazonjs
- > Notice in wp-content/plugins/affiliate-amazon-blockaab/lib/amazonjs/amazonjs.php+371
Undefined index: defaults
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=amazonjs
- > Notice in wp-content/plugins/affiliate-amazon-blockaab/lib/amazonjs/amazonjs.php+637
Undefined index: placeholder
- 12 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=amazonjs
- > Notice in wp-content/plugins/affiliate-amazon-blockaab/lib/amazonjs/amazonjs.php+650
Undefined index: description
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
The following issues need your attention
- 4× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/affiliate-amazon-blockaab/lib/amazonjs/amazonjs.php:984
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/affiliate-amazon-blockaab/lib/amazonjs/amazonjs.php:984
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/affiliate-amazon-blockaab/lib/amazonjs/media-upload-type-amazonjs.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/affiliate-amazon-blockaab/lib/amazonjs/amazonjs.php:984
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 88% from 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
- Donate link: Invalid URI found ("")
- Screenshots: Please add an image for screenshot #1 (Search by Amazon API)
affiliate-amazon-blockaab/index.php 92% from 13 tests
The entry point to "affiliate-amazon-block(aab)" version 0.1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("affiliate-amazon-blockaab.php" instead of "index.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin9,524 lines of code in 39 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JSON | 3 | 0 | 0 | 5,420 |
PHP | 7 | 245 | 389 | 2,359 |
JavaScript | 22 | 64 | 29 | 965 |
CSS | 4 | 11 | 2 | 374 |
PO File | 1 | 141 | 143 | 373 |
Markdown | 1 | 16 | 0 | 23 |
XML | 1 | 3 | 0 | 10 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.43 |
Average class complexity | 46.20 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 115.00 |
Average method complexity | 5.11 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 67.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 5 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 5 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 55 | |
▷ Static methods | 4 | 7.27% |
▷ Public methods | 54 | 98.18% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 1.82% |
Functions | 9 | |
▷ Named functions | 9 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 11 | |
▷ Global constants | 7 | 63.64% |
▷ Class constants | 4 | 36.36% |
▷ Public constants | 4 | 100.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
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
lib/amazonjs/images/amazonjs.png | 1.77KB | 1.33KB | ▼ 25.18% |
lib/amazonjs/images/amazon-icon.png | 0.49KB | 0.47KB | ▼ 3.39% |
lib/amazonjs/screenshot-1.png | 12.23KB | 5.55KB | ▼ 54.64% |