79% wpsso-google-merchant-feed

Code Review | WPSSO Google Merchant Feed XML

WordPress plugin WPSSO Google Merchant Feed XML scored79%from 54 tests.

About plugin

  • Plugin page: wpsso-google-merc...
  • Plugin version: 9.0.0
  • PHP compatiblity: 7.2.34+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4.1
  • WordPress version: 6.3.1
  • First release: Aug 25, 2022
  • Latest release: Dec 1, 2023
  • Number of updates: 849
  • Update frequency: every 0.6 days
  • Top authors: jsmoriss (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /7,599 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 gracefully, with no errors

Server metrics [RAM: ▲0.35MB] [CPU: ▼3.63ms] Passed 4 tests

An overview of server-side resources used by WPSSO Google Merchant Feed XML
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3836.90 ▼2.78
Dashboard /wp-admin3.69 ▲0.3948.55 ▼18.88
Posts /wp-admin/edit.php3.75 ▲0.3950.43 ▲4.99
Add New Post /wp-admin/post-new.php6.21 ▲0.3393.65 ▲2.17
Media Library /wp-admin/upload.php3.55 ▲0.3338.41 ▲5.65

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 100 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WPSSO Google Merchant Feed XML
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3414.72 ▲0.081.74 ▲0.1037.28 ▼9.22
Dashboard /wp-admin2,201 ▲245.62 ▼0.0798.15 ▲6.6942.39 ▲0.63
Posts /wp-admin/edit.php2,106 ▲61.97 ▼0.0440.07 ▼1.7837.34 ▲1.36
Add New Post /wp-admin/post-new.php1,532 ▲623.22 ▲0.11750.80 ▲132.0947.62 ▼12.85
Media Library /wp-admin/upload.php1,409 ▲124.28 ▲0.0698.29 ▲0.1442.24 ▲1.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 15× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/wpsso-google-merchant-feed/lib/register.php
    • > /wp-content/plugins/wpsso-google-merchant-feed/gettext/gettext-lib-config.php
    • > /wp-content/plugins/wpsso-google-merchant-feed/lib/abstract/add-on.php
    • > /wp-content/plugins/wpsso-google-merchant-feed/lib/abstract/com/add-on.php
    • > /wp-content/plugins/wpsso-google-merchant-feed/lib/actions.php
    • > /wp-content/plugins/wpsso-google-merchant-feed/lib/filters.php
    • > /wp-content/plugins/wpsso-google-merchant-feed/lib/submenu/google-merchant.php
    • > /wp-content/plugins/wpsso-google-merchant-feed/lib/filters-edit.php
    • > /wp-content/plugins/wpsso-google-merchant-feed/gettext/gettext-lib-abstract-com.php
    • > /wp-content/plugins/wpsso-google-merchant-feed/wpsso-google-merchant-feed.php
  • 20× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Trait 'Vitalybaev\\GoogleMerchant\\HasProperties' not found in wp-content/plugins/wpsso-google-merchant-feed/vendor/vitalybaev/google-merchant-feed/src/Inventory.php on line 5
    • > PHP Fatal error
      Trait 'Vitalybaev\\GoogleMerchant\\HasProperties' not found in wp-content/plugins/wpsso-google-merchant-feed/vendor/vitalybaev/google-merchant-feed/src/PropertyBag.php on line 5
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabre\\Xml\\Element' not found in wp-content/plugins/wpsso-google-merchant-feed/vendor/sabre/xml/lib/Element/Uri.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Vitalybaev\\GoogleMerchant\\Product' not found in wp-content/plugins/wpsso-google-merchant-feed/vendor/vitalybaev/google-merchant-feed/src/Meta/Product.php:12
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/wpsso-google-merchant-feed/vendor/vitalybaev/google-merchant-feed/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/wpsso-google-merchant-feed/vendor/vitalybaev/google-merchant-feed/tests/bootstrap.php on line 3
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabre\\Xml\\Element' not found in wp-content/plugins/wpsso-google-merchant-feed/vendor/sabre/xml/lib/Element/KeyValue.php:38
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabre\\Xml\\XmlSerializable' not found in wp-content/plugins/wpsso-google-merchant-feed/vendor/sabre/xml/lib/Element/Cdata.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabre\\Xml\\XmlSerializable' not found in wp-content/plugins/wpsso-google-merchant-feed/vendor/vitalybaev/google-merchant-feed/src/RssElement.php:5
    • > PHP Warning
      require(wp-content/plugins/wpsso-google-merchant-feed/vendor/vitalybaev/google-merchant-feed/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/wpsso-google-merchant-feed/vendor/vitalybaev/google-merchant-feed/tests/bootstrap.php on line 3
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabre\\Xml\\Element' not found in wp-content/plugins/wpsso-google-merchant-feed/vendor/sabre/xml/lib/Element/Elements.php:38

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: google shopping, easy digital downloads, polylang, google merchant center, woocommerce product feed...

wpsso-google-merchant-feed/wpsso-google-merchant-feed.php Passed 13 tests

This is the main PHP file of "WPSSO Google Merchant Feed XML" version 9.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
120 characters long description:
Google Merchant product and inventory feed XML for WooCommerce and custom product pages, including multilingual support.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin5,000 lines of code in 81 files:
LanguageFilesBlank linesComment linesLines of code
PHP661,4152,8074,151
JSON600355
Markdown3620203
PO File17073176
YAML212272
HTML232030
XML10013

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity9.18
▷ Minimum class complexity1.00
▷ Maximum class complexity79.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces12
Interfaces3
Traits2
Classes46
▷ Abstract classes24.35%
▷ Concrete classes4495.65%
▷ Final classes00.00%
Methods247
▷ Static methods4919.84%
▷ Public methods22490.69%
▷ Protected methods93.64%
▷ Private methods145.67%
Functions25
▷ Named functions1872.00%
▷ Anonymous functions728.00%
Constants22
▷ Global constants731.82%
▷ Class constants1568.18%
▷ Public constants15100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-128x128.png13.57KB5.74KB▼ 57.71%
images/icon-256x256.png30.77KB12.98KB▼ 57.82%