71% aadp-amazon-affiliate-dropshipping-for-woocommerce

Code Review | AADP: Amazon Affiliate & Dropshipping for WooCommerce

WordPress plugin AADP: Amazon Affiliate & Dropshipping for WooCommerce scored 71% from 54 tests.

About plugin

  • Plugin page: aadp-amazon-affil...
  • Plugin version: 0.0.8
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7.2
  • WordPress version: 5.9.2
  • First release: Jun 9, 2021
  • Latest release: Jun 12, 2021
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: wpseobooster (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active / 1,462 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.02MB] [CPU: ▼311.05ms] Passed 4 tests

This is a short check of server-side resources used by AADP: Amazon Affiliate & Dropshipping for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0153.60 ▲3.64
Dashboard /wp-admin3.41 ▲0.0033.20 ▲1.22
Posts /wp-admin/edit.php3.65 ▲0.0135.51 ▲0.65
Add New Post /wp-admin/post-new.php6.88 ▼0.0990.16 ▼1,244.34
Media Library /wp-admin/upload.php3.30 ▲0.0022.59 ▼1.72
AADP Docs /wp-admin/admin.php?page=aadp_amazon_affiliate_dropshipping_docs3.1018.89
Product Importer /wp-admin/admin.php?page=wp_amazon_product_importer3.1018.06
Settings /wp-admin/admin.php?page=wp_amazon3.1016.60

Server storage [IO: ▲3.01MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 408 new files
Database: no new tables, 10 new options
New WordPress options
use_for
amazon_associate_tag
default_store
amazon_hero_search
enable_no_follow
buy_now_action
product_importer
cart_import_category
wp_amazon_country
import_as

Browser metrics Passed 4 tests

An overview of browser requirements for AADP: Amazon Affiliate & Dropshipping for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲1915.87 ▲0.305.90 ▼0.362.32 ▼0.08
Dashboard /wp-admin2,895 ▲346.15 ▼0.03117.54 ▼15.29155.32 ▼2.24
Posts /wp-admin/edit.php2,691 ▲33.24 ▲0.0261.76 ▼1.64141.62 ▲3.23
Add New Post /wp-admin/post-new.php1,661 ▼2916.61 ▼5.51406.25 ▼27.59160.55 ▲5.98
Media Library /wp-admin/upload.php1,698 ▼05.50 ▲0.01135.20 ▼11.12183.73 ▲3.83
AADP Docs /wp-admin/admin.php?page=aadp_amazon_affiliate_dropshipping_docs280.940.0318.12
Product Importer /wp-admin/admin.php?page=wp_amazon_product_importer280.940.0317.05
Settings /wp-admin/admin.php?page=wp_amazon280.940.0316.79

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
  • Zombie WordPress options were found after uninstall: 10 options
    • use_for
    • enable_no_follow
    • buy_now_action
    • wp_amazon_country
    • default_store
    • product_importer
    • amazon_associate_tag
    • import_as
    • cart_import_category
    • amazon_hero_search

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/aadp-amazon-affiliate-dropshipping-for-woocommerce/aadp.php
    • > /wp-content/plugins/aadp-amazon-affiliate-dropshipping-for-woocommerce/vendor/symfony/mime/Resources/bin/update_mime_types.php
  • 169× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Contracts\\HttpClient\\ResponseInterface' not found in wp-content/plugins/aadp-amazon-affiliate-dropshipping-for-woocommerce/vendor/symfony/http-client/Response/NativeResponse.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Mime\\Crypto\\SMime' not found in wp-content/plugins/aadp-amazon-affiliate-dropshipping-for-woocommerce/vendor/symfony/mime/Crypto/SMimeSigner.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Contracts\\HttpClient\\Exception\\HttpExceptionInterface' not found in wp-content/plugins/aadp-amazon-affiliate-dropshipping-for-woocommerce/vendor/symfony/http-client-contracts/Exception/RedirectionExceptionInterface.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\Constraint\\Constraint' not found in wp-content/plugins/aadp-amazon-affiliate-dropshipping-for-woocommerce/vendor/symfony/dom-crawler/Test/Constraint/CrawlerSelectorTextContains.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\Handler\\HandlerInterface' not found in wp-content/plugins/aadp-amazon-affiliate-dropshipping-for-woocommerce/vendor/symfony/css-selector/Parser/Handler/CommentHandler.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/aadp-amazon-affiliate-dropshipping-for-woocommerce/templates/admin_docs.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\HttpClient\\Exception\\TransportException' not found in wp-content/plugins/aadp-amazon-affiliate-dropshipping-for-woocommerce/vendor/symfony/http-client/Exception/TimeoutException.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Mime\\RawMessage' not found in wp-content/plugins/aadp-amazon-affiliate-dropshipping-for-woocommerce/vendor/symfony/mime/Message.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Contracts\\HttpClient\\ResponseInterface' not found in wp-content/plugins/aadp-amazon-affiliate-dropshipping-for-woocommerce/vendor/symfony/http-client/Response/AmpResponse.php:41
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Contracts\\HttpClient\\HttpClientInterface' not found in wp-content/plugins/aadp-amazon-affiliate-dropshipping-for-woocommerce/vendor/symfony/http-client/CurlHttpClient.php:35

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=aadp_amazon_affiliate_dropshipping_docs
    • > Network (severe)
    wp-admin/admin.php?page=aadp_amazon_affiliate_dropshipping_docs - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=wp_amazon_product_importer
    • > Network (severe)
    wp-admin/admin.php?page=wp_amazon_product_importer - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=wp_amazon
    • > Network (severe)
    wp-admin/admin.php?page=wp_amazon - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes: The official readme.txt might help

aadp-amazon-affiliate-dropshipping-for-woocommerce/aadp.php 69% from 13 tests

Analyzing the main PHP file in "AADP: Amazon Affiliate & Dropshipping for WooCommerce" version 0.0.8
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("aadp-amazon-affiliate-dropshipping-for-woocommerce.php" instead of "aadp.php")
  • Domain Path: The domain path folder was not found ("/lang/")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 280 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected47,260 lines of code in 368 files:
LanguageFilesBlank linesComment linesLines of code
PHP3075,3148,74244,256
JSON21001,863
JavaScript76745566
Markdown231550417
CSS7132286
reStructuredText1393437
YAML16019
XML11016

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity13.59
▷ Minimum class complexity1.00
▷ Maximum class complexity179.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces58
Interfaces38
Traits10
Classes221
▷ Abstract classes135.88%
▷ Concrete classes20894.12%
▷ Final classes8440.38%
Methods1,535
▷ Static methods22514.66%
▷ Public methods1,30785.15%
▷ Protected methods764.95%
▷ Private methods1529.90%
Functions218
▷ Named functions9744.50%
▷ Anonymous functions12155.50%
Constants197
▷ Global constants8040.61%
▷ Class constants11759.39%
▷ Public constants10791.45%

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 are no PNG files in this plugin