67% product-lister-etsy

Code Review | Product Lister for Etsy

WordPress plugin Product Lister for Etsy scored67%from 54 tests.

About plugin

  • Plugin page: product-lister-etsy
  • Plugin version: 2.3.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Nov 4, 2017
  • Latest release: Nov 3, 2023
  • Number of updates: 44
  • Update frequency: every 49.8 days
  • Top authors: cedcommerce (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /4,877 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼7.00ms] Passed 4 tests

A check of server-side resources used by Product Lister for Etsy
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.29 ▼5.71
Dashboard /wp-admin3.31 ▼0.0443.97 ▼19.38
Posts /wp-admin/edit.php3.36 ▲0.0049.61 ▲1.86
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.37 ▼4.78
Media Library /wp-admin/upload.php3.23 ▲0.0037.43 ▲5.18

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 71 new files
Database: 2 new tables, 7 new options
New tables
wp_ced_etsy_accounts
wp_ced_etsy_profiles
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
ced_etsy_auth_info

Browser metrics Passed 4 tests

An overview of browser requirements for Product Lister for Etsy
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5314.19 ▼0.151.87 ▲0.2744.19 ▲6.72
Dashboard /wp-admin2,192 ▲175.61 ▼0.2789.29 ▼21.1837.20 ▼7.17
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0840.48 ▲5.4936.14 ▼1.76
Add New Post /wp-admin/post-new.php1,526 ▼1023.04 ▲0.08649.23 ▲34.9356.02 ▲8.52
Media Library /wp-admin/upload.php1,394 ▼64.19 ▼0.0395.01 ▼11.7842.06 ▼12.83

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie tables were found after uninstall: 2 tables
    • wp_ced_etsy_accounts
    • wp_ced_etsy_profiles
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • ced_etsy_auth_info

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/product-lister-etsy/admin/partials/woocommmerce-etsy-integration-admin-display.php
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_get_product() in wp-content/plugins/product-lister-etsy/admin/partials/ced-etsy-metakeys-list.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/product-lister-etsy/admin/pages/setting-pages/ced-etsy-scheduler-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/product-lister-etsy/admin/pages/setting-pages/ced-etsy-product-upload-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Cedhandler' not found in wp-content/plugins/product-lister-etsy/admin/etsy/lib/class-ced-etsy-request.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Cedhandler' not found in wp-content/plugins/product-lister-etsy/admin/etsy/lib/etsyProducts.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ced_etsy_get_auth() in wp-content/plugins/product-lister-etsy/admin/etsy/lib/vendor/login_with_etsy.php:148
    • > PHP Warning
      Use of undefined constant CED_ETSY_DIRPATH - assumed 'CED_ETSY_DIRPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/product-lister-etsy/admin/etsy/lib/vendor/login_with_etsy.php on line 141
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/product-lister-etsy/admin/pages/setting-pages/ced-etsy-metakeys-template.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots need descriptions #1, #10, #11, #12, #13, #14, #15, #16, #2, #3, #4, #5, #6, #7, #8, #9 in product-lister-etsy/assets to your readme.txt
The official readme.txt is a good inspiration

product-lister-etsy/product-lister-etsy.php 85% from 13 tests

The main PHP file in "Product Lister for Etsy" ver. 2.3.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • 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
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.7" instead of "3.0")

Code Analysis 97% from 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 plugin12,950 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
PHP381,0633,3569,899
CSS163431,803
JavaScript28166748
PO File1205239468
JSON110032

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 129)
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity92.43
▷ Minimum class complexity1.00
▷ Maximum class complexity630.00
Average method complexity8.14
▷ Minimum method complexity1.00
▷ Maximum method complexity129.00
Code structure
Namespaces0
Interfaces0
Traits1
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods269
▷ Static methods103.72%
▷ Public methods26096.65%
▷ Protected methods10.37%
▷ Private methods82.97%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants16100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/etsy.png4.56KB2.69KB▼ 40.95%
admin/images/icon.png9.15KB0.80KB▼ 91.21%
admin/images/etsyicon.png40.13KB12.02KB▼ 70.05%
admin/images/logo1.png0.41KB0.42KB0.00%
admin/images/_logo1.png1.40KB0.80KB▼ 43.12%