60% purple-xmls-google-product-feed-for-woocommerce

Code Review | Product Feed on WooCommerce for Google, Awin, Shareasale, Bing, and More

WordPress plugin Product Feed on WooCommerce for Google, Awin, Shareasale, Bing, and More scored60%from 54 tests.

About plugin

  • Plugin page: purple-xmls-googl...
  • Plugin version: 3.5.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.9
  • WordPress version: 6.3.1
  • First release: Oct 19, 2013
  • Latest release: Dec 5, 2022
  • Number of updates: 296
  • Update frequency: every 11.3 days
  • Top authors: PurpleTurtlePro (99.66%)

Code review

54 tests

User reviews

72 reviews

Install metrics

1,000+ active /170,716 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼2.01ms] 75% from 4 tests

This is a short check of server-side resources used by Product Feed on WooCommerce for Google, Awin, Shareasale, Bing, and More
Please have a look at the following items
  • CPU: Total CPU usage should be kept under 500.00ms (currently 837.26ms on /wp-admin/admin.php?page=cart-product-feed-manage-page)
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2537.52 ▲0.58
Dashboard /wp-admin3.47 ▲0.1747.35 ▲2.06
Posts /wp-admin/edit.php3.58 ▲0.2348.39 ▼1.07
Add New Post /wp-admin/post-new.php6.05 ▲0.1683.71 ▼9.60
Media Library /wp-admin/upload.php3.39 ▲0.1639.28 ▲8.59
Create New Feed /wp-admin/admin.php?page=cart-product-feed-admin4.861,440.47
Tutorials /wp-admin/admin.php?page=cart-product-feed-tutorials-page4.44734.64
Manage Feeds /wp-admin/admin.php?page=cart-product-feed-manage-page4.44837.26

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 297 new files
Database: 5 new tables, 14 new options
New tables
wp_cpf_resolved_product_data
wp_cpf_custom_products
wp_cpf_customfeeds
wp_cpf_feedproducts
wp_cp_feeds
New WordPress options
cp_feed_order_reverse
db_upgraded
widget_theysaidso_widget
cart-product-feed-installation-date
theysaidso_admin_options
widget_recent-comments
cp_localkey
widget_recent-posts
cp_feed_delay
CPFDBVERSION
...

Browser metrics Passed 4 tests

Checking browser requirements for Product Feed on WooCommerce for Google, Awin, Shareasale, Bing, and More
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,923 ▲16214.76 ▲0.492.05 ▲0.4638.12 ▼2.37
Dashboard /wp-admin2,307 ▲1305.67 ▲0.0981.51 ▼7.7581.17 ▲43.13
Posts /wp-admin/edit.php2,142 ▲422.01 ▲0.0435.67 ▼2.6535.05 ▼0.38
Add New Post /wp-admin/post-new.php1,564 ▲1323.18 ▲4.88700.65 ▲76.7560.95 ▲2.13
Media Library /wp-admin/upload.php1,442 ▲424.20 ▼0.0196.36 ▲0.3170.95 ▲28.33
Create New Feed /wp-admin/admin.php?page=cart-product-feed-admin1,2442.1136.2129.70
Tutorials /wp-admin/admin.php?page=cart-product-feed-tutorials-page2,21422.01473.0826.75
Manage Feeds /wp-admin/admin.php?page=cart-product-feed-manage-page1,1422.1830.7130.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie tables were found after uninstall: 5 tables
    • wp_cpf_customfeeds
    • wp_cp_feeds
    • wp_cpf_resolved_product_data
    • wp_cpf_feedproducts
    • wp_cpf_custom_products
  • Zombie WordPress options detected upon uninstall: 14 options
    • CPFDBVERSION
    • cp_licensekey
    • cp_localkey
    • db_upgraded
    • cp_feed_order
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • cpf_custom_attribute_user_map
    • can_compress_scripts
    • cart-product-feed-installation-date
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cart-product-feed-manage-page
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/purple-xmls-google-product-feed-for-woocommerce/core/classes/dialogfeedeBaysettings.php
    • > /wp-content/plugins/purple-xmls-google-product-feed-for-woocommerce/core/feeds/shareasale/categories.php
  • 28× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/purple-xmls-google-product-feed-for-woocommerce/core/feeds/aggxmlgoogle/dialog.tpl.php:11
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/purple-xmls-google-product-feed-for-woocommerce/core/feeds/kelkoo/templates/property.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/purple-xmls-google-product-feed-for-woocommerce/core/feeds/kelkoo/dialog.tpl.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'EXCPF_PBaseFeedDialog' not found in wp-content/plugins/purple-xmls-google-product-feed-for-woocommerce/core/feeds/tradetracker/dialognew.php:12
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/purple-xmls-google-product-feed-for-woocommerce/core/feeds/kelkoo/templates/new.usedcars.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/purple-xmls-google-product-feed-for-woocommerce/core/feeds/facebookxml/dialog.tpl.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/purple-xmls-google-product-feed-for-woocommerce/core/feeds/aggtxt/dialog.tpl.php:11
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/purple-xmls-google-product-feed-for-woocommerce/core/feeds/kelkoo/templates/wine.champagne.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'EXCPF_PBaseFeedDialog' not found in wp-content/plugins/purple-xmls-google-product-feed-for-woocommerce/core/feeds/aggtsv/dialognew.php:11
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/purple-xmls-google-product-feed-for-woocommerce/core/feeds/kelkoo/templates/fashion.accessories.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 81% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Requires php: Invalid plugin version format
  • Screenshots: Please add images for these screenshots: #1 (Select 'Product Feed' from the Admin Menu), #2 (Select Export Type - More formats coming too!), #3 (Provide the filters according to your preferences and search product), #4 (Custom Feed - Choose the filtered products, move to right, give the title for feed and click on 'Get Feed'), #5 (Feed By Category - Choose merchant's category, local category, specify the feed title and click on 'Get Feed' to generate the feed), #6 (Manage your feed with feed configuration)
  • Tags: Please delete some tags, you are using 71 tag instead of maximum 10
The official readme.txt is a good inspiration

purple-xmls-google-product-feed-for-woocommerce/cart-product-feed.php 77% from 13 tests

The main PHP script in "Product Feed on WooCommerce for Google, Awin, Shareasale, Bing, and More" version 3.5.7 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("purple-xmls-google-product-feed-for-woocommerce.php" instead of "cart-product-feed.php")
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.0.1" instead of "3.5")
  • Plugin Name: It is recommended to keep the plugin name shorter than 70 characters (currently 72 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin40,683 lines of code in 224 files:
LanguageFilesBlank linesComment linesLines of code
PHP1873,9123,98920,269
JavaScript174,49414,34916,684
CSS192093163,487
SVG100243

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
The following items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 121)
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity10.86
▷ Minimum class complexity1.00
▷ Maximum class complexity460.00
Average method complexity3.92
▷ Minimum method complexity1.00
▷ Maximum method complexity121.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes214
▷ Abstract classes00.00%
▷ Concrete classes214100.00%
▷ Final classes00.00%
Methods724
▷ Static methods476.49%
▷ Public methods65290.06%
▷ Protected methods172.35%
▷ Private methods557.60%
Functions51
▷ Named functions4996.08%
▷ Anonymous functions23.92%
Constants23
▷ Global constants2191.30%
▷ Class constants28.70%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
23 PNG files occupy 0.56MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/exf-sm-logo.png3.42KB2.30KB▼ 32.85%
images/cpf-sm-logo.png23.73KB6.79KB▼ 71.38%
screenshot-3.png40.73KB16.24KB▼ 60.13%
images/reset.png1.79KB1.02KB▼ 42.86%
images/ebay.png6.63KB2.30KB▼ 65.34%