77% socialhead-for-google-shopping-product-feeds-woo

Code Review | Product Feed for Google Shopping, Facebook & Instagram - WooCommerce Plugin By Socialhead

WordPress plugin Product Feed for Google Shopping, Facebook & Instagram - WooCommerce Plugin By Socialhead scored77%from 54 tests.

About plugin

  • Plugin page: socialhead-for-go...
  • Plugin version: 2.0.7
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Dec 31, 2020
  • Latest release: Jun 26, 2023
  • Number of updates: 52
  • Update frequency: every 17.5 days
  • Top authors: socialhead (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

100+ active /2,535 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.86ms] Passed 4 tests

Server-side resources used by Product Feed for Google Shopping, Facebook & Instagram - WooCommerce Plugin By Socialhead
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.75 ▼2.96
Dashboard /wp-admin3.31 ▲0.0047.04 ▼4.49
Posts /wp-admin/edit.php3.36 ▲0.0049.17 ▲2.67
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.78 ▼8.56
Media Library /wp-admin/upload.php3.23 ▲0.0036.47 ▲0.58

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

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

Browser metrics Passed 4 tests

Product Feed for Google Shopping, Facebook & Instagram - WooCommerce Plugin By Socialhead: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▲0.101.61 ▼0.1440.43 ▼6.63
Dashboard /wp-admin2,203 ▲215.90 ▲0.03105.64 ▲3.6037.94 ▼5.94
Posts /wp-admin/edit.php2,092 ▲32.02 ▼0.0141.51 ▲3.5736.86 ▲1.23
Add New Post /wp-admin/post-new.php1,542 ▲1418.19 ▼5.06588.96 ▼71.4848.91 ▼7.69
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.0596.31 ▼16.6841.27 ▼7.67

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • socialshop_requirement

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/socialhead-for-google-shopping-product-feeds-woo/templates/socialhead.php
    • > /wp-content/plugins/socialhead-for-google-shopping-product-feeds-woo/socialshop.php
  • 119× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Trait '__\\Traits\\Arrays' not found in wp-content/plugins/socialhead-for-google-shopping-product-feeds-woo/vendor/me-io/php-lodash/src/__.php on line 12
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UriInterface' not found in wp-content/plugins/socialhead-for-google-shopping-product-feeds-woo/vendor/guzzlehttp/psr7/src/Uri.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/socialhead-for-google-shopping-product-feeds-woo/vendor/guzzlehttp/promises/src/EachPromise.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UploadedFileInterface' not found in wp-content/plugins/socialhead-for-google-shopping-product-feeds-woo/vendor/guzzlehttp/psr7/src/UploadedFile.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/socialhead-for-google-shopping-product-feeds-woo/vendor/guzzlehttp/promises/tests/CoroutineTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Tests\\Psr7\\BaseTest' not found in wp-content/plugins/socialhead-for-google-shopping-product-feeds-woo/vendor/guzzlehttp/psr7/tests/ServerRequestTest.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/socialhead-for-google-shopping-product-feeds-woo/vendor/psr/http-message/src/ServerRequestInterface.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/socialhead-for-google-shopping-product-feeds-woo/vendor/guzzlehttp/promises/tests/FulfilledPromiseTest.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/socialhead-for-google-shopping-product-feeds-woo/vendor/guzzlehttp/promises/tests/TaskQueueTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/socialhead-for-google-shopping-product-feeds-woo/vendor/guzzlehttp/promises/tests/RejectedPromiseTest.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: woocommerce, facebook catalog, facebook shop, google shopping feed, google shopping

socialhead-for-google-shopping-product-feeds-woo/socialshop.php 69% from 13 tests

"Product Feed for Google Shopping, Facebook & Instagram - WooCommerce Plugin By Socialhead" version 2.0.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 149 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("socialhead-for-google-shopping-product-feeds-woo.php" instead of "socialshop.php")
  • Git Repository: An alternative Git repository was detected

Code Analysis Passed 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
Everything looks great! No dangerous files found in this plugin26,901 lines of code in 276 files:
LanguageFilesBlank linesComment linesLines of code
PHP2094,0318,44020,479
Markdown221,53404,505
JSON900734
Sass5201362
CSS51121302
YAML8383201
JavaScript41213109
XML541103
SVG70075
make211031

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity10.28
▷ Minimum class complexity1.00
▷ Maximum class complexity87.00
Average method complexity2.01
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces22
Interfaces18
Traits10
Classes162
▷ Abstract classes10.62%
▷ Concrete classes16199.38%
▷ Final classes2113.04%
Methods1,733
▷ Static methods23213.39%
▷ Public methods1,60592.61%
▷ Protected methods50.29%
▷ Private methods1237.10%
Functions449
▷ Named functions5913.14%
▷ Anonymous functions39086.86%
Constants66
▷ Global constants1015.15%
▷ Class constants5684.85%
▷ Public constants56100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 compressed PNG files occupy 0.24MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/step-store-connect.png14.92KB15.59KB0.00%
assets/images/step-validate.png10.92KB11.56KB0.00%
assets/images/shopping-channels-small.png18.00KB19.18KB0.00%
assets/images/step-register-account.png18.72KB19.49KB0.00%
assets/images/integrate-setup.png16.26KB17.33KB0.00%