46% wp-lister-for-amazon

Code Review | WP-Lister Lite for Amazon

WordPress plugin WP-Lister Lite for Amazon scored46%from 54 tests.

About plugin

  • Plugin page: wp-lister-for-amazon
  • Plugin version: 2.5.5
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 24, 2015
  • Latest release: Jul 10, 2023
  • Number of updates: 96
  • Update frequency: every 31.3 days
  • Top authors: wp-lab (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

1,000+ active /122,452 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲2.74MB] [CPU: ▲9.40ms] Passed 4 tests

A check of server-side resources used by WP-Lister Lite for Amazon
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /5.49 ▲2.0354.33 ▲5.35
Dashboard /wp-admin6.30 ▲2.9572.08 ▲7.36
Posts /wp-admin/edit.php6.35 ▲2.9969.55 ▲20.37
Add New Post /wp-admin/post-new.php9.17 ▲3.28113.22 ▲4.51
Media Library /wp-admin/upload.php6.22 ▲2.9969.69 ▲30.10
Tutorial /wp-admin/admin.php?page=wpla-tutorial6.1564.33
Listings /wp-admin/admin.php?page=wpla6.98172.87
Orders /wp-admin/admin.php?page=wpla-orders6.7960.49
Reports /wp-admin/admin.php?page=wpla-reports6.8161.83
Tools /wp-admin/admin.php?page=wpla-tools7.0962.54
Profiles /wp-admin/admin.php?page=wpla-profiles6.1555.73
Settings /wp-admin/admin.php?page=wpla-settings6.1574.67
Import /wp-admin/admin.php?page=wpla-import6.6670.11
Feeds /wp-admin/admin.php?page=wpla-feeds6.8158.80

Server storage [IO: ▲41.64MB] [DB: ▲0.02MB] 67% from 3 tests

Input-output and database impact of this plugin
These are issues you should consider
  • Total filesystem usage must be limited to 25MB (currently using 41.64MB)
Filesystem: 4,436 new files
Database: 15 new tables, 24 new options
New tables
wp_amazon_feed_templates
wp_amazon_reports
wp_amazon_stock_log
wp_amazon_feed_tpl_values
wp_amazon_jobs
wp_amazon_profiles
wp_amazon_markets
wp_amazon_btg
wp_amazon_shipping
wp_amazon_feeds
...
New WordPress options
db_upgraded
wpla_cron_last_full_run
wpla_update_channel
wpla_daily_cron_last_run
wpla_fba_report_cron_last_run
wpla_orders_cron_last_run
wpla_announcements
wpla_staging_site_pattern
widget_recent-comments
theysaidso_admin_options
...

Browser metrics Passed 4 tests

An overview of browser requirements for WP-Lister Lite for Amazon
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,076 ▲31513.52 ▼1.077.78 ▲6.0439.69 ▼4.03
Dashboard /wp-admin2,327 ▲1505.68 ▲0.0494.37 ▼5.3779.89 ▲40.49
Posts /wp-admin/edit.php2,240 ▲1402.06 ▲0.0435.37 ▼8.3934.74 ▼2.82
Add New Post /wp-admin/post-new.php1,656 ▲12417.53 ▼5.46665.71 ▼56.9235.17 ▼63.29
Media Library /wp-admin/upload.php1,531 ▲1344.27 ▲0.17102.64 ▼3.8477.90 ▲32.57
Tutorial /wp-admin/admin.php?page=wpla-tutorial1,2142.0234.9148.19
Listings /wp-admin/admin.php?page=wpla1,6422.1040.1333.27
Orders /wp-admin/admin.php?page=wpla-orders1,5512.2134.5830.82
Reports /wp-admin/admin.php?page=wpla-reports1,4472.1131.6236.51
Tools /wp-admin/admin.php?page=wpla-tools1,6522.0331.8430.68
Profiles /wp-admin/admin.php?page=wpla-profiles1,2892.0229.0627.68
Settings /wp-admin/admin.php?page=wpla-settings9191.6211.1120.82
Import /wp-admin/admin.php?page=wpla-import1,2001.9927.4826.50
Feeds /wp-admin/admin.php?page=wpla-feeds1,3452.0230.3429.94

Uninstaller [IO: ▲0.00MB] [DB: ▲0.02MB] 50% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 15 tables in the database
    • wp_amazon_listings
    • wp_amazon_feed_tpl_values
    • wp_amazon_accounts
    • wp_amazon_log
    • wp_amazon_orders
    • wp_amazon_feed_templates
    • wp_amazon_feeds
    • wp_amazon_profiles
    • wp_amazon_markets
    • wp_amazon_reports
    • ...
  • The uninstall procedure has failed, leaving 24 options in the database
    • wpla_enable_missing_details_warning
    • theysaidso_admin_options
    • widget_recent-comments
    • recovery_mode_email_last_sent
    • wpla_last_announcement_check
    • widget_recent-posts
    • wpla_cron_last_full_run
    • wpla_db_version
    • wpla_daily_cron_last_run
    • can_compress_scripts
    • ...

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpla-feeds
    • > Warning in wp-content/plugins/wp-lister-for-amazon/classes/core/WPLA_Setup.php+174
    Use of undefined constant WOOCOMMERCE_VERSION - assumed 'WOOCOMMERCE_VERSION' (this will throw an Error in a future version of PHP)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpla-settings
    • > Warning in wp-content/plugins/wp-lister-for-amazon/classes/page/SettingsPage.php+965
    Use of undefined constant WC_PLUGIN_FILE - assumed 'WC_PLUGIN_FILE' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=wpla-settings
    • > Error in wp-content/plugins/wp-lister-for-amazon/classes/page/SettingsPage.php+172
    Uncaught Error: Call to undefined function WC() in wp-content/plugins/wp-lister-for-amazon/classes/page/SettingsPage.php:172
    Stack trace:
    #0 wp-content/plugins/wp-lister-for-amazon/classes/page/SettingsPage.php(166): WPLA_SettingsPage->displayGeneralSettingsPage()
    #1 wp-includes/class-wp-hook.php(310): WPLA_SettingsPage->onDisplaySettingsPage()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 {main}
    thrown

SRP 0% 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
  • 40× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/wp-lister-for-amazon/includes/amazon/src/MarketplaceWebService/Samples/CancelFeedSubmissionsSample.php
    • > /wp-content/plugins/wp-lister-for-amazon/includes/amazon/vendor/mtdowling/jmespath.php/bin/jp.php
    • > /wp-content/plugins/wp-lister-for-amazon/includes/amazon/src/MarketplaceWebService/Samples/GetFeedSubmissionResultSample.php
    • > /wp-content/plugins/wp-lister-for-amazon/includes/amazon/src/MarketplaceWebServiceProducts/Samples/GetProductCategoriesForASINSample.php
    • > /wp-content/plugins/wp-lister-for-amazon/includes/amazon/src/MarketplaceWebServiceProducts/Samples/GetMatchingProductForIdSample.php
    • > /wp-content/plugins/wp-lister-for-amazon/views/profile/select_profile.php
    • > /wp-content/plugins/wp-lister-for-amazon/includes/amazon/src/MWSSubscriptionsService/Samples/SendTestNotificationToDestinationSample.php
    • > /wp-content/plugins/wp-lister-for-amazon/includes/amazon/src/MWSSubscriptionsService/Samples/ListSubscriptionsSample.php
    • > /wp-content/plugins/wp-lister-for-amazon/includes/amazon/src/MarketplaceWebServiceProducts/Samples/GetLowestPricedOffersForASINSample.php
    • > /wp-content/plugins/wp-lister-for-amazon/includes/amazon/src/MarketplaceWebService/Samples/RequestReportSample.php
  • 2798× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Client\\ClientExceptionInterface' not found in wp-content/plugins/wp-lister-for-amazon/includes/amazon/vendor/wplab/guzzlehttp/guzzle/src/Exception/GuzzleException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\Table\\Table' not found in wp-content/plugins/wp-lister-for-amazon/includes/dompdf/lib/php-font-lib/src/FontLib/Table/Type/glyf.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'SellingPartnerApi\\Model\\ModelInterface' not found in wp-content/plugins/wp-lister-for-amazon/includes/amazon/vendor/jlevers/selling-partner-api/lib/Model/ProductPricingV0/LowestPriceType.php:44
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/wp-lister-for-amazon/includes/amazon/vendor/aws/aws-sdk-php/src/AutoScaling/AutoScalingClient.php:132
    • > PHP Fatal error
      Uncaught Error: Interface 'SellingPartnerApi\\Model\\ModelInterface' not found in wp-content/plugins/wp-lister-for-amazon/includes/amazon/vendor/jlevers/selling-partner-api/lib/Model/MessagingV1/GetAttributesResponse.php:45
    • > PHP Fatal error
      Uncaught Error: Class 'WPLab\\Dompdf\\FrameDecorator\\AbstractFrameDecorator' not found in wp-content/plugins/wp-lister-for-amazon/includes/dompdf/src/FrameDecorator/Table.php:21
    • > PHP Notice
      Undefined variable: serviceUrl in wp-content/plugins/wp-lister-for-amazon/includes/amazon/src/MarketplaceWebServiceProducts/Samples/GetProductCategoriesForSKUSample.php on line 45
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AbstractConfigurationProvider' not found in wp-content/plugins/wp-lister-for-amazon/includes/amazon/vendor/aws/aws-sdk-php/src/S3/UseArnRegion/ConfigurationProvider.php:44
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/wp-lister-for-amazon/includes/amazon/vendor/aws/aws-sdk-php/src/KafkaConnect/KafkaConnectClient.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-lister-for-amazon/views/settings_tabs.php:21

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpla-settings
    • > Network (severe)
    wp-content/plugins/assets/css/select2.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: export, woocommerce, import, products, amazon...

wp-lister-for-amazon/wp-lister-amazon.php 85% from 13 tests

The entry point to "WP-Lister Lite for Amazon" version 2.5.5 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Requires at least: Required version must match the one declared in readme.txt ("4.2" instead of "6.0.0")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-lister-for-amazon.php" instead of "wp-lister-amazon.php")

Code Analysis 0% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Please make sure to remedy the following
  • Do not include executable or dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/wp-lister-for-amazon/includes/amazon/vendor/aws/aws-crt-php/run_tests.bat
516,995 lines of code in 3,883 files:
LanguageFilesBlank linesComment linesLines of code
PHP3,683109,197417,983497,233
Markdown462,24306,650
PO File21,6966,3633,878
XML7760393,381
JSON28602,650
CSS61661291,012
JavaScript11270292850
SVG900612
YAML6611316
Bourne Shell3194176
HTML36073
reStructuredText1352959
GLSL117055
m414422
Bourne Again Shell15013
make1409
INI3114
DOS Batch1202

PHP code 0% from 2 tests

Analyzing cyclomatic complexity and code structure
These items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 1,017)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 651)
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity14.65
▷ Minimum class complexity1.00
▷ Maximum class complexity1,017.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity651.00
Code structure
Namespaces838
Interfaces95
Traits30
Classes3,489
▷ Abstract classes792.26%
▷ Concrete classes3,41097.74%
▷ Final classes892.61%
Methods45,004
▷ Static methods7,53316.74%
▷ Public methods41,88093.06%
▷ Protected methods8141.81%
▷ Private methods2,3105.13%
Functions2,152
▷ Named functions27912.96%
▷ Anonymous functions1,87387.04%
Constants4,020
▷ Global constants601.49%
▷ Class constants3,96098.51%
▷ Public constants3,82196.49%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
61 PNG files occupy 0.16MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/amazon-business.png45.92KB16.47KB▼ 64.13%
js/jqueryFileTree/images/xls.png0.65KB0.63KB▼ 2.41%
img/amazon-256x256.png5.84KB2.88KB▼ 50.69%
img/icon-error.png5.01KB2.68KB▼ 46.48%
img/search3.png1.24KB0.32KB▼ 74.41%