78% product-share

Code Review | Social Share for WooCommerce

WordPress plugin Social Share for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: product-share
  • Plugin version: 1.2.7
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4
  • WordPress version: 6.3.1
  • First release: Apr 27, 2022
  • Latest release: Nov 15, 2023
  • Number of updates: 50
  • Update frequency: every 11.3 days
  • Top authors: wpxteam (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

2,000+ active /17,662 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.94ms] Passed 4 tests

Server-side resources used by Social Share for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0433.54 ▼9.85
Dashboard /wp-admin3.35 ▲0.0447.01 ▼2.95
Posts /wp-admin/edit.php3.40 ▲0.0446.02 ▼0.00
Add New Post /wp-admin/post-new.php5.93 ▲0.0486.45 ▼14.96
Media Library /wp-admin/upload.php3.27 ▲0.0433.55 ▲0.64

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Social Share for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲1114.13 ▼0.261.86 ▼0.2941.14 ▼3.39
Dashboard /wp-admin2,200 ▲205.54 ▲0.0491.65 ▼3.2437.30 ▼3.46
Posts /wp-admin/edit.php2,108 ▲81.97 ▼0.0039.43 ▲2.0138.06 ▲0.18
Add New Post /wp-admin/post-new.php1,534 ▲823.62 ▲0.46627.73 ▼78.6953.50 ▼4.37
Media Library /wp-admin/upload.php1,411 ▲114.20 ▲0.06100.41 ▼3.5442.51 ▼2.70

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/product-share/product-share.php
    • > /wp-content/plugins/product-share/includes/class-product-share.php
    • > /wp-content/plugins/product-share/includes/class-product-share-icons.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/product-share/includes/setting-tab/general.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/product-share/includes/setting-tab/advanced.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/product-share/includes/layout.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: icons, social media, share, buttons, woocommerce...

product-share/product-share.php 92% from 13 tests

The main file in "Social Share for WooCommerce" v. 1.2.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.8" instead of "5.5")

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
There were no executable files found in this plugin8,061 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
CSS122,667446,176
PHP125452631,800
JavaScript337885

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity28.57
▷ Minimum class complexity2.00
▷ Maximum class complexity49.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods84
▷ Static methods2732.14%
▷ Public methods84100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin