78% woocommerce-to-google-merchant-center

Code Review | Woo Product Feed For Marketing Channels

WordPress plugin Woo Product Feed For Marketing Channels scored78%from 54 tests.

About plugin

  • Plugin page: woocommerce-to-go...
  • Plugin version: 1.9.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 11, 2014
  • Latest release: May 30, 2021
  • Number of updates: 147
  • Update frequency: every 16.3 days
  • Top authors: asaquzzaman (95.92%)innovs (4.76%)

Code review

54 tests

User reviews

35 reviews

Install metrics

700+ active /49,971 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Woo Product Feed For Marketing Channels
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.68 ▼3.96
Dashboard /wp-admin3.31 ▲0.0150.34 ▼0.30
Posts /wp-admin/edit.php3.43 ▲0.0748.85 ▲1.02
Add New Post /wp-admin/post-new.php5.89 ▲0.0196.19 ▼2.01
Media Library /wp-admin/upload.php3.23 ▲0.0038.27 ▲3.91

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 176 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
woogool_version

Browser metrics Passed 4 tests

A check of browser resources used by Woo Product Feed For Marketing Channels
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.28 ▲0.001.67 ▼0.1343.21 ▼3.40
Dashboard /wp-admin2,199 ▲255.50 ▼0.0883.08 ▼20.2336.17 ▼7.53
Posts /wp-admin/edit.php2,107 ▲101.97 ▼0.0734.18 ▼3.5235.52 ▲0.76
Add New Post /wp-admin/post-new.php1,543 ▲1723.18 ▲0.28584.05 ▼115.7550.67 ▼6.69
Media Library /wp-admin/upload.php1,410 ▲74.21 ▲0.01100.86 ▼5.7842.75 ▲0.46

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • woogool_version
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
The following issues need your attention
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/woocommerce-to-google-merchant-center/views/tutorial/hireme.php
    • > /wp-content/plugins/woocommerce-to-google-merchant-center/views/tutorial/single.php
    • > /wp-content/plugins/woocommerce-to-google-merchant-center/views/tutorial/multiple.php
    • > /wp-content/plugins/woocommerce-to-google-merchant-center/views/single/tutorial.php
    • > /wp-content/plugins/woocommerce-to-google-merchant-center/views/multiple/multiple-product.php
  • 81× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'Google/Exception.php' (include_path='.:/usr/share/php') in wp-content/plugins/woocommerce-to-google-merchant-center/includes/Google/Service/Exception.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'Google/Client.php' (include_path='.:/usr/share/php') in wp-content/plugins/woocommerce-to-google-merchant-center/includes/Google/Http/Batch.php on line 18
    • > PHP Warning
      require_once(Google/Exception.php): failed to open stream: No such file or directory in wp-content/plugins/woocommerce-to-google-merchant-center/includes/Google/IO/Exception.php on line 18
    • > PHP Fatal error
      require_once(): Failed opening required 'Google/Exception.php' (include_path='.:/usr/share/php') in wp-content/plugins/woocommerce-to-google-merchant-center/includes/Google/Auth/Exception.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function woogool_pages() in wp-content/plugins/woocommerce-to-google-merchant-center/views/multiple/header.php:2
    • > PHP Fatal error
      require_once(): Failed opening required 'Google/Cache/Abstract.php' (include_path='.:/usr/share/php') in wp-content/plugins/woocommerce-to-google-merchant-center/includes/Google/Cache/File.php on line 18
    • > PHP Warning
      require_once(Google/Cache/Abstract.php): failed to open stream: No such file or directory in wp-content/plugins/woocommerce-to-google-merchant-center/includes/Google/Cache/Apc.php on line 18
    • > PHP Notice
      Undefined variable: mail in wp-content/plugins/woocommerce-to-google-merchant-center/views/tutorial/hireme.php on line 78
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/woocommerce-to-google-merchant-center/includes/Google/Service/ShoppingContent.php:32
    • > PHP Warning
      require_once(Google/Auth/Exception.php): failed to open stream: No such file or directory in wp-content/plugins/woocommerce-to-google-merchant-center/includes/Google/Signer/P12.php on line 18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Requires at least: Invalid version format
You can look at the official readme.txt

woocommerce-to-google-merchant-center/wogol.php 92% from 13 tests

The main file in "Woo Product Feed For Marketing Channels" v. 1.9.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woocommerce-to-google-merchant-center.php" instead of "wogol.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin38,685 lines of code in 145 files:
LanguageFilesBlank linesComment linesLines of code
PHP1233,6234,02825,354
JavaScript141,6451,68111,540
CSS573591,654
JSON20073
SVG10064

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity10.02
▷ Minimum class complexity1.00
▷ Maximum class complexity264.00
Average method complexity2.05
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes126
▷ Abstract classes75.56%
▷ Concrete classes11994.44%
▷ Final classes10.84%
Methods1,101
▷ Static methods393.54%
▷ Public methods1,03594.01%
▷ Protected methods312.82%
▷ Private methods353.18%
Functions225
▷ Named functions22399.11%
▷ Anonymous functions20.89%
Constants46
▷ Global constants1021.74%
▷ Class constants3678.26%
▷ Public constants36100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
20 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/js/chosen/chosen-sprite@2x.png0.72KB0.83KB0.00%
assets/css/images/ui-bg_diagonals-small_75_cccccc_40x40.png0.15KB0.10KB▼ 35.06%
assets/css/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
assets/css/chosen/chosen-sprite@2x.png0.72KB0.83KB0.00%
assets/css/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%