Benchmarks
Plugin footprint 82% 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: ▲2.44MB] [CPU: ▲12.74ms] Passed 4 tests
This is a short check of server-side resources used by LATMMO Aff Amazon
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 5.98 ▲2.47 | 66.75 ▲20.24 |
Dashboard /wp-admin | 5.83 ▲2.44 | 72.99 ▲5.33 |
Posts /wp-admin/edit.php | 5.88 ▲2.47 | 76.03 ▲24.34 |
Add New Post /wp-admin/post-new.php | 8.37 ▲2.44 | 108.66 ▲1.05 |
Media Library /wp-admin/upload.php | 5.68 ▲2.41 | 65.20 ▲28.33 |
Table Compare /wp-admin/edit.php?post_type=latmmo-table-compare | 5.86 | 64.15 |
Amazon Product /wp-admin/edit.php?post_type=latmmo-product | 5.86 | 65.74 |
Server storage [IO: ▲29.09MB] [DB: ▲0.00MB] 67% from 3 tests
Analyzing filesystem and database footprints of this plugin
These are issues you should consider
- The filesystem usage should be lower than 25MB (currently using 29.09MB)
Filesystem: 3,023 new files
Database: no new tables, 7 new options
New WordPress options |
---|
theysaidso_admin_options |
db_upgraded |
can_compress_scripts |
_latmmo_amazon_options |
widget_recent-comments |
widget_theysaidso_widget |
widget_recent-posts |
Browser metrics Passed 4 tests
An overview of browser requirements for LATMMO Aff Amazon
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,990 ▲204 | 13.50 ▼0.85 | 8.90 ▲7.10 | 42.97 ▼0.77 |
Dashboard /wp-admin | 2,295 ▲115 | 5.67 ▼0.00 | 92.87 ▼17.97 | 37.45 ▼18.65 |
Posts /wp-admin/edit.php | 2,206 ▲103 | 2.04 ▲0.00 | 42.69 ▲1.06 | 37.45 ▲4.74 |
Add New Post /wp-admin/post-new.php | 6,570 ▲5,044 | 28.96 ▲5.96 | 998.23 ▲344.88 | 41.63 ▼19.30 |
Media Library /wp-admin/upload.php | 1,503 ▲100 | 4.29 ▲0.14 | 100.47 ▼1.39 | 45.34 ▼2.62 |
Cronjob /wp-admin/admin.php?page=latmmo-settings#tab=cronjob | 1,822 | 5.60 | 87.08 | 49.46 |
Addons /wp-admin/admin.php?page=latmmo-settings#tab=addons | 1,823 | 5.39 | 75.09 | 34.15 |
Table Compare /wp-admin/edit.php?post_type=latmmo-table-compare | 1,605 | 5.37 | 67.06 | 30.70 |
General /wp-admin/admin.php?page=latmmo-settings#tab=general | 1,839 | 5.38 | 78.16 | 35.02 |
Amazon Product /wp-admin/edit.php?post_type=latmmo-product | 1,608 | 5.62 | 64.37 | 29.03 |
Table Compare /wp-admin/admin.php?page=latmmo-settings#tab=table-compare | 1,852 | 4.82 | 67.06 | 35.38 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
- Zombie WordPress options were found after uninstall: 7 options
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-comments
- theysaidso_admin_options
- db_upgraded
- widget_recent-posts
- _latmmo_amazon_options
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
- 25 occurences, only the last one shown
- > GET request to /wp-admin/edit.php?post_type=latmmo-product
- > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
- 25 occurences, only the last one shown
- > GET request to /wp-admin/edit.php?post_type=latmmo-product
- > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
- 5× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/latmmo-aff-amazon/libs/paapi5-php-sdk/SampleGetItemsApi.php
- > /wp-content/plugins/latmmo-aff-amazon/libs/paapi5-php-sdk/SampleGetVariationsApi.php
- > /wp-content/plugins/latmmo-aff-amazon/libs/paapi5-php-sdk/SampleSearchItemsApi.php
- > /wp-content/plugins/latmmo-aff-amazon/libs/paapi5-php-sdk/vendor/squizlabs/php_codesniffer/scripts/build-phar.php
- > /wp-content/plugins/latmmo-aff-amazon/libs/paapi5-php-sdk/SampleGetBrowseNodesApi.php
- 1461× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_Constraint' not found in wp-content/plugins/latmmo-aff-amazon/libs/paapi5-php-sdk/vendor/phpunit/phpunit/src/Framework/Constraint/Callback.php:14
- > PHP Fatal error
Uncaught Error: Class 'Symfony\\Component\\Console\\Application' not found in wp-content/plugins/latmmo-aff-amazon/libs/paapi5-php-sdk/vendor/friendsofphp/php-cs-fixer/src/Console/Application.php:36
- > PHP Fatal error
Uncaught Error: Class 'PhpCsFixer\\Tokenizer\\AbstractTransformer' not found in wp-content/plugins/latmmo-aff-amazon/libs/paapi5-php-sdk/vendor/friendsofphp/php-cs-fixer/src/Tokenizer/Transformer/ImportTransformer.php:31
- > PHP Fatal error
Uncaught Error: Class 'Symfony\\Component\\Console\\Descriptor\\Descriptor' not found in wp-content/plugins/latmmo-aff-amazon/libs/paapi5-php-sdk/vendor/symfony/console/Descriptor/MarkdownDescriptor.php:29
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/latmmo-aff-amazon/libs/paapi5-php-sdk/vendor/guzzlehttp/psr7/src/CachingStream.php:10
- > PHP Fatal error
Uncaught Error: Class 'Symfony\\Component\\Finder\\Tests\\Iterator\\RealIteratorTestCase' not found in wp-content/plugins/latmmo-aff-amazon/libs/paapi5-php-sdk/vendor/symfony/finder/Tests/FinderTest.php:16
- > PHP Fatal error
Uncaught Error: Class 'Prophecy\\Exception\\Prophecy\\MethodProphecyException' not found in wp-content/plugins/latmmo-aff-amazon/libs/paapi5-php-sdk/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php:16
- > PHP Fatal error
Uncaught Error: Class 'PhpCsFixer\\AbstractFixer' not found in wp-content/plugins/latmmo-aff-amazon/libs/paapi5-php-sdk/vendor/friendsofphp/php-cs-fixer/src/Fixer/ClassNotation/ProtectedToPrivateFixer.php:26
- > PHP Fatal error
Uncaught Error: Class 'Symfony\\Component\\Console\\Output\\Output' not found in wp-content/plugins/latmmo-aff-amazon/libs/paapi5-php-sdk/vendor/symfony/console/Output/StreamOutput.php:31
- > PHP Fatal error
Uncaught Error: Interface 'PHP_CodeSniffer_Sniff' not found in wp-content/plugins/latmmo-aff-amazon/libs/paapi5-php-sdk/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/Objects/ObjectMemberCommaSniff.php:28
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: amazon, amazon affiliate
latmmo-aff-amazon/main.php 85% from 13 tests
"LATMMO Aff Amazon" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 168 characters long)
- Main file name: It is recommended to name the main PHP file as the plugin slug ("latmmo-aff-amazon.php" instead of "main.php")
Code Analysis 3% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
It is important to fix the following items
- Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
- .exe - Executable in Windows
- ☣ wp-content/plugins/latmmo-aff-amazon/libs/paapi5-php-sdk/vendor/symfony/console/Resources/bin/hiddeninput.exe
- .bat - Batch File in Windows
- ☣ wp-content/plugins/latmmo-aff-amazon/libs/paapi5-php-sdk/vendor/squizlabs/php_codesniffer/scripts/phpcbf.bat
- ☣ wp-content/plugins/latmmo-aff-amazon/libs/paapi5-php-sdk/vendor/squizlabs/php_codesniffer/scripts/phpcs.bat
- .exe - Executable in Windows
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2,240 | 46,395 | 97,320 | 198,410 |
SVG | 9 | 0 | 0 | 52,712 |
Markdown | 105 | 3,195 | 0 | 10,478 |
PO File | 20 | 3,037 | 3,414 | 6,180 |
XML | 188 | 234 | 136 | 5,552 |
Sass | 25 | 1,069 | 3 | 5,492 |
JSON | 70 | 9 | 0 | 5,339 |
CSS | 14 | 374 | 490 | 4,854 |
JavaScript | 18 | 1,317 | 403 | 4,273 |
YAML | 39 | 171 | 89 | 3,462 |
reStructuredText | 5 | 887 | 437 | 1,301 |
XSD | 4 | 29 | 31 | 466 |
Ant | 4 | 69 | 0 | 426 |
C | 1 | 52 | 8 | 223 |
m4 | 1 | 11 | 11 | 41 |
C/C++ Header | 1 | 12 | 8 | 40 |
Bourne Shell | 2 | 1 | 0 | 21 |
DOS Batch | 2 | 2 | 22 | 16 |
Dockerfile | 1 | 8 | 0 | 10 |
make | 1 | 4 | 0 | 9 |
PHP code 50% from 2 tests
A short review of cyclomatic complexity and code structure
Please fix the following
- Method cyclomatic complexity has to be reduced to less than 100 (currently 270)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.38 |
Average class complexity | 10.98 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 542.00 |
Average method complexity | 2.85 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 270.00 |
Code structure | ||
---|---|---|
Namespaces | 202 | |
Interfaces | 155 | |
Traits | 13 | |
Classes | 2,091 | |
▷ Abstract classes | 73 | 3.49% |
▷ Concrete classes | 2,018 | 96.51% |
▷ Final classes | 443 | 21.95% |
Methods | 12,411 | |
▷ Static methods | 1,263 | 10.18% |
▷ Public methods | 10,167 | 81.92% |
▷ Protected methods | 1,000 | 8.06% |
▷ Private methods | 1,244 | 10.02% |
Functions | 1,003 | |
▷ Named functions | 384 | 38.29% |
▷ Anonymous functions | 619 | 61.71% |
Constants | 828 | |
▷ Global constants | 133 | 16.06% |
▷ Class constants | 695 | 83.94% |
▷ Public constants | 695 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/placeholder.png | 24.75KB | 10.16KB | ▼ 58.94% |
libs/codestar-framework/assets/images/checkerboard.png | 2.29KB | 2.54KB | 0.00% |