79% wpsso-commerce-manager-catalog-feed

Code Review | WPSSO Commerce Manager Catalog Feed XML

WordPress plugin WPSSO Commerce Manager Catalog Feed XML scored79%from 54 tests.

About plugin

  • Plugin page: wpsso-commerce-ma...
  • Plugin version: 4.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: Jan 19, 2023
  • Latest release: Dec 1, 2023
  • Number of updates: 430
  • Update frequency: every 0.7 days
  • Top authors: jsmoriss (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active /2,455 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.32MB] [CPU: ▼3.37ms] Passed 4 tests

Analyzing server-side resources used by WPSSO Commerce Manager Catalog Feed XML
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3541.65 ▲0.52
Dashboard /wp-admin3.67 ▲0.3249.10 ▼11.35
Posts /wp-admin/edit.php3.72 ▲0.3650.26 ▲2.65
Add New Post /wp-admin/post-new.php6.19 ▲0.3092.75 ▼5.28
Media Library /wp-admin/upload.php3.53 ▲0.3037.72 ▲4.39

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WPSSO Commerce Manager Catalog Feed XML
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲5914.57 ▲0.231.94 ▲0.2039.54 ▼4.46
Dashboard /wp-admin2,204 ▲275.63 ▲0.1195.47 ▲7.2242.91 ▲1.68
Posts /wp-admin/edit.php2,103 ▲31.94 ▼0.0439.46 ▲0.5635.69 ▲0.08
Add New Post /wp-admin/post-new.php1,532 ▲223.35 ▲0.34674.67 ▲70.6157.06 ▲5.88
Media Library /wp-admin/upload.php1,409 ▲124.14 ▼0.0497.21 ▲0.8143.45 ▲0.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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
Almost there! Just 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-commerce-manager-catalog-feed/lib/filters-messages.php
    • > /wp-content/plugins/wpsso-commerce-manager-catalog-feed/lib/abstract/add-on.php
    • > /wp-content/plugins/wpsso-commerce-manager-catalog-feed/lib/rewrite.php
    • > /wp-content/plugins/wpsso-commerce-manager-catalog-feed/lib/register.php
    • > /wp-content/plugins/wpsso-commerce-manager-catalog-feed/lib/submenu/facebook-catalog.php
    • > /wp-content/plugins/wpsso-commerce-manager-catalog-feed/gettext/gettext-lib-config.php
    • > /wp-content/plugins/wpsso-commerce-manager-catalog-feed/gettext/gettext-lib-abstract-com.php
    • > /wp-content/plugins/wpsso-commerce-manager-catalog-feed/lib/xml.php
    • > /wp-content/plugins/wpsso-commerce-manager-catalog-feed/lib/filters-advanced.php
    • > /wp-content/plugins/wpsso-commerce-manager-catalog-feed/lib/actions.php
  • 20× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabre\\Xml\\Element' not found in wp-content/plugins/wpsso-commerce-manager-catalog-feed/vendor/sabre/xml/lib/Element/KeyValue.php:38
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabre\\Xml\\Element' not found in wp-content/plugins/wpsso-commerce-manager-catalog-feed/vendor/sabre/xml/lib/Element/Elements.php:38
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabre\\Xml\\Element' not found in wp-content/plugins/wpsso-commerce-manager-catalog-feed/vendor/sabre/xml/lib/Element/XmlFragment.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'PhpCsFixer\\Finder' not found in wp-content/plugins/wpsso-commerce-manager-catalog-feed/vendor/sabre/uri/.php-cs-fixer.dist.php:3
    • > PHP Fatal error
      Trait 'Sabre\\Xml\\ContextStackTrait' not found in wp-content/plugins/wpsso-commerce-manager-catalog-feed/vendor/sabre/xml/lib/Writer.php on line 33
    • > PHP Fatal error
      Trait 'Vitalybaev\\GoogleMerchant\\HasProperties' not found in wp-content/plugins/wpsso-commerce-manager-catalog-feed/vendor/vitalybaev/google-merchant-feed/src/Product/Shipping.php on line 12
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabre\\Xml\\Element' not found in wp-content/plugins/wpsso-commerce-manager-catalog-feed/vendor/sabre/xml/lib/Element/Base.php:20
    • > PHP Warning
      require(wp-content/plugins/wpsso-commerce-manager-catalog-feed/vendor/vitalybaev/google-merchant-feed/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/wpsso-commerce-manager-catalog-feed/vendor/vitalybaev/google-merchant-feed/tests/bootstrap.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Sabre\\Xml\\ParseException' not found in wp-content/plugins/wpsso-commerce-manager-catalog-feed/vendor/sabre/xml/lib/LibXMLException.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wpsso-commerce-manager-catalog-feed/vendor/vitalybaev/google-merchant-feed/tests/feed/ProductTest.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
8 plugin tags: wpml, facebook feed, facebook catalog, instagram, woocommerce...

wpsso-commerce-manager-catalog-feed/wpsso-commerce-manager-catalog-feed.php Passed 13 tests

"WPSSO Commerce Manager Catalog Feed XML" version 4.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
99 characters long description:
Facebook and Instagram Commerce Manager Catalog Feed XMLs for WooCommerce and custom product pages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected4,659 lines of code in 80 files:
LanguageFilesBlank linesComment linesLines of code
PHP651,3072,7613,898
JSON600355
Markdown3570159
PO File15259132
YAML212272
HTML232030
XML10013

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity8.41
▷ Minimum class complexity1.00
▷ Maximum class complexity56.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces12
Interfaces3
Traits2
Classes46
▷ Abstract classes24.35%
▷ Concrete classes4495.65%
▷ Final classes00.00%
Methods243
▷ Static methods4719.34%
▷ Public methods22492.18%
▷ Protected methods72.88%
▷ Private methods124.94%
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

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-256x256.png29.63KB13.47KB▼ 54.55%
images/icon-128x128.png12.81KB5.98KB▼ 53.36%