77% elex-woocommerce-google-product-feed-plugin-basic

Code Review | ELEX WooCommerce Google Shopping (Google Product Feed)

WordPress plugin ELEX WooCommerce Google Shopping (Google Product Feed) scored77%from 54 tests.

About plugin

  • Plugin page: elex-woocommerce-...
  • Plugin version: 1.3.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0-6.2
  • WordPress version: 6.3.1
  • First release: Jun 10, 2019
  • Latest release: Jul 5, 2023
  • Number of updates: 52
  • Update frequency: every 28.6 days
  • Top authors: elextensions (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

2,000+ active /44,060 total downloads

Benchmarks

Plugin footprint 83% 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.04MB] [CPU: ▼7.71ms] Passed 4 tests

A check of server-side resources used by ELEX WooCommerce Google Shopping (Google Product Feed)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0538.40 ▼7.70
Dashboard /wp-admin3.36 ▲0.0147.57 ▼15.61
Posts /wp-admin/edit.php3.41 ▲0.0550.82 ▲2.58
Add New Post /wp-admin/post-new.php5.94 ▲0.0590.74 ▼9.86
Media Library /wp-admin/upload.php3.28 ▲0.0537.45 ▲2.32

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 84 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for ELEX WooCommerce Google Shopping (Google Product Feed)
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6014.47 ▲0.031.60 ▼0.2938.77 ▼2.87
Dashboard /wp-admin2,212 ▲274.84 ▼1.13105.67 ▲5.7938.21 ▼0.05
Posts /wp-admin/edit.php2,098 ▲92.05 ▲0.0739.38 ▲4.2635.29 ▼1.45
Add New Post /wp-admin/post-new.php1,544 ▲2323.24 ▼0.02634.08 ▼50.1049.14 ▼12.41
Media Library /wp-admin/upload.php1,394 ▲34.21 ▼0.0494.16 ▼14.2440.64 ▼5.24

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/elex-woocommerce-google-product-feed-plugin-basic/review_and_troubleshoot_notify/resources/logo.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/elex-woocommerce-google-product-feed-plugin-basic/includes/market.php:90
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/elex-woocommerce-google-product-feed-plugin-basic/review_and_troubleshoot_notify/resources/review.php:58
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/elex-woocommerce-google-product-feed-plugin-basic/review_and_troubleshoot_notify/resources/troubleshoot.php:59

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 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
5 plugin tags: google product feed, google shopping, woocommerce google product feed, woocommerce google shopping, google merchant center

elex-woocommerce-google-product-feed-plugin-basic/elex-product-feed-basic.php 77% from 13 tests

"ELEX WooCommerce Google Shopping (Google Product Feed)" version 1.3.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("elex-woocommerce-google-product-feed-plugin-basic.php" instead of "elex-product-feed-basic.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Requires at least: The required version number must match the one declared in readme.txt ("3.0.1" instead of "2.6.0")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin46,435 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript163585732,960
CSS573168,071
PHP27268604,742
PO File2158180626
SVG10036

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 113)
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity51.25
▷ Minimum class complexity3.00
▷ Maximum class complexity447.00
Average method complexity9.61
▷ Minimum method complexity1.00
▷ Maximum method complexity113.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods65
▷ Static methods23.08%
▷ Public methods65100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
26 PNG files occupy 0.46MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/arrow-down.png0.41KB0.23KB▼ 44.26%
assets/images/pause.png0.40KB0.22KB▼ 43.63%
assets/icons/jquery-ui-lib-icons/ui-icons_444444_256x240.png6.84KB4.18KB▼ 38.90%
assets/images/download.png0.50KB0.52KB0.00%
resources/dynamic_pricing.png92.32KB23.50KB▼ 74.55%