72% exportfeed-for-woocommerce-google-product-feed

Code Review | Sync WooCommerce Product feed to Google Shopping

WordPress plugin Sync WooCommerce Product feed to Google Shopping scored 72% from 54 tests.

About plugin

  • Plugin page: exportfeed-for-wo...
  • Plugin version: 1.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.8
  • WordPress version: 5.8.1
  • First release: Nov 4, 2016
  • Latest release: Oct 31, 2021
  • Number of updates: 23
  • Update frequency: every 79.3 days
  • Top authors: PurpleTurtlePro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 2,837 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Sync WooCommerce Product feed to Google Shopping
Please take the time to fix the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 1,283.83ms on /wp-admin/admin.php?page=gcpf-feed-admin)
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0137.65 ▼15.22
Dashboard /wp-admin3.09 ▲0.0348.87 ▲7.52
Posts /wp-admin/edit.php3.14 ▲0.0350.65 ▲0.47
Add New Post /wp-admin/post-new.php5.44 ▲0.0195.04 ▼554.36
Media Library /wp-admin/upload.php3.03 ▲0.0336.14 ▼1.61
Tutorials /wp-admin/admin.php?page=gcpf-feed-tutorials-page3.024,206.45
Manage Feeds /wp-admin/admin.php?page=gcpf-feed-manage-page3.01693.56
Create New Feed /wp-admin/admin.php?page=gcpf-feed-admin2.991,283.83

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 125 new files
Database: 2 new tables, 6 new options
New tables
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Sync WooCommerce Product feed to Google Shopping
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,740 ▲16815.98 ▼0.018.14 ▲0.8747.39 ▼7.41
Dashboard /wp-admin2,998 ▲675.90 ▼0.04142.99 ▼13.67138.64 ▲17.74
Posts /wp-admin/edit.php2,778 ▲392.59 ▼0.0968.40 ▼5.2399.45 ▲14.98
Add New Post /wp-admin/post-new.php1,708 ▲2518.76 ▲0.51393.06 ▲1.24118.72 ▲7.16
Media Library /wp-admin/upload.php1,789 ▼185.02 ▼0.00134.50 ▼18.39156.15 ▲32.98
Tutorials /wp-admin/admin.php?page=gcpf-feed-tutorials-page2,0509.98280.10117.57
Manage Feeds /wp-admin/admin.php?page=gcpf-feed-manage-page1,4622.3661.0383.12
Create New Feed /wp-admin/admin.php?page=gcpf-feed-admin12,6452.8999.99131.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie tables were found after uninstall: 2 tables
    • wp_gcpf_custom_products
    • wp_gcp_feeds
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • gcp_feed_order_reverse
    • gcp_feed_delay
    • gcp_localkey
    • gcpf-installation-date
    • gcp_licensekey
    • gcp_feed_order

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/exportfeed-for-woocommerce-google-product-feed/core/classes/dialogbasefeed.tpl.php:11
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/exportfeed-for-woocommerce-google-product-feed/core/classes/dialogbasefeedcustom.tpl.php:177
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/exportfeed-for-woocommerce-google-product-feed/core/feeds/productlistraw/dialog.tpl.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test


Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (Select Google Feed from the Admin Menu), #2 (Custom Feed - Search the products from the filter form.), #3 (Custom Feed - Select the products from the list, assign the categories and create feed.), #4 (To create feed by WooCommerce Categories, select the tab Google Feed [Category] on Create Feed Option from admin menu and create feed.), #5 (Manage the exisitng feed from feed manage page or tabs.)
  • Tags: Please delete some tags, you are using 16 tag instead of maximum 10
The official readme.txt might help

exportfeed-for-woocommerce-google-product-feed/google-feed.php 77% from 13 tests

The main PHP file in "Sync WooCommerce Product feed to Google Shopping" ver. 1.2.4 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Requires at least: Required version does not match the one declared in readme.txt ("3.0.1" instead of "3.0.0")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("exportfeed-for-woocommerce-google-product-feed.php" instead of "google-feed.php")
  • 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

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin33,132 lines of code in 85 files:
LanguageFilesBlank linesComment linesLines of code

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 109)
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity12.37
▷ Minimum class complexity1.00
▷ Maximum class complexity255.00
Average method complexity3.64
▷ Minimum method complexity1.00
▷ Maximum method complexity109.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes94100.00%
▷ Final classes00.00%
▷ Static methods5613.83%
▷ Public methods32179.26%
▷ Protected methods122.96%
▷ Private methods7217.78%
▷ Named functions3397.06%
▷ Anonymous functions12.94%
▷ Global constants14100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
19 PNG files occupy 0.62MB with 0.39MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png7.69KB3.57KB▼ 53.52%
images/gts-logo.png11.13KB3.93KB▼ 64.72%
screenshot-6.png115.14KB41.03KB▼ 64.36%
screenshot-5.png65.31KB24.25KB▼ 62.87%
screenshot-4.png120.00KB43.45KB▼ 63.79%