10% product-lister-ebay

Code Review | Product Lister for eBay

WordPress plugin Product Lister for eBay scored10%from 54 tests.

About plugin

  • Plugin page: product-lister-ebay
  • Plugin version: 2.0.8
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3.1
  • WordPress version: 6.3.1
  • First release: Apr 24, 2017
  • Latest release: Sep 19, 2023
  • Number of updates: 65
  • Update frequency: every 36.0 days
  • Top authors: cedcommerce (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

40+ active /4,524 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > User error in wp-content/plugins/product-lister-ebay/product-lister-ebay.php+48

Server metrics [RAM: ▲0.81MB] [CPU: ▲0.05ms] Passed 4 tests

Server-side resources used by Product Lister for eBay
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.32 ▲0.8546.20 ▲3.03
Dashboard /wp-admin4.15 ▲0.8464.30 ▲14.08
Posts /wp-admin/edit.php4.20 ▲0.8448.68 ▲1.53
Add New Post /wp-admin/post-new.php6.69 ▲0.8091.46 ▼9.45
Media Library /wp-admin/upload.php4.01 ▲0.7840.84 ▲5.10

Server storage [IO: ▲6.67MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 157 new files
Database: 5 new tables, 6 new options
New tables
wp_ced_ebay_shipping
wp_ced_ebay_accounts
wp_ced_ebay_profiles
wp_ced_ebay_discription_template
wp_ced_ebay_logs
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Product Lister for eBay: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲7614.74 ▲0.391.62 ▼0.1143.60 ▼0.39
Dashboard /wp-admin2,214 ▲345.87 ▲0.2488.06 ▲1.8539.11 ▲1.92
Posts /wp-admin/edit.php2,118 ▲182.37 ▲0.3637.77 ▲1.8031.63 ▼3.23
Add New Post /wp-admin/post-new.php1,542 ▲1421.11 ▼1.97687.87 ▲15.9647.79 ▼2.85
Media Library /wp-admin/upload.php1,416 ▲164.56 ▲0.3697.62 ▲3.2041.42 ▼1.78

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 5 tables in the database
    • wp_ced_ebay_logs
    • wp_ced_ebay_discription_template
    • wp_ced_ebay_accounts
    • wp_ced_ebay_shipping
    • wp_ced_ebay_profiles
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATH/wp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/product-lister-ebay/product-lister-ebay.php on line 40
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/product-lister-ebay/product-lister-ebay.php on line 40
    • > PHP Warning
      require_once(ABSPATH/wp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/product-lister-ebay/product-lister-ebay.php on line 40

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can take inspiration from this readme.txt

product-lister-ebay/product-lister-ebay.php 92% from 13 tests

The main PHP script in "Product Lister for eBay" version 2.0.8 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
There were no executable files found in this plugin133,654 lines of code in 139 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript7622,56615,863116,997
PHP461,6531,61210,984
CSS164851764,958
PO File1316364715

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
These items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 258)
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity49.77
▷ Minimum class complexity1.00
▷ Maximum class complexity482.00
Average method complexity6.76
▷ Minimum method complexity1.00
▷ Maximum method complexity258.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes30
▷ Abstract classes00.00%
▷ Concrete classes30100.00%
▷ Final classes00.00%
Methods250
▷ Static methods156.00%
▷ Public methods24397.20%
▷ Protected methods20.80%
▷ Private methods52.00%
Functions18
▷ Named functions1688.89%
▷ Anonymous functions211.11%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/cross.png0.51KB0.38KB▼ 24.76%
admin/images/check.png0.43KB0.53KB0.00%
admin/images/icon-100X100.png0.97KB0.57KB▼ 41.07%
admin/images/icon.png9.15KB0.80KB▼ 91.21%
admin/images/ebay-card.png7.09KB2.91KB▼ 58.98%