10% wp-woo-product-social-share

Code Review | Social Share For WooCommerce

WordPress plugin Social Share For WooCommerce scored10%from 54 tests.

About plugin

  • Plugin page: wp-woo-product-so...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Sep 30, 2020
  • Latest release: Jul 21, 2022
  • Number of updates: 16
  • Update frequency: every 41.2 days
  • Top authors: kuldip_raghu (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /25,796 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/wp-woo-product-social-share/includes/wpsi_render_front_icons.php+28
    Trying to access array offset on value of type bool

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

A check of server-side resources used by Social Share For WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.39 ▲1.10
Dashboard /wp-admin3.31 ▲0.0047.45 ▼4.69
Posts /wp-admin/edit.php3.36 ▲0.0048.61 ▼8.45
Add New Post /wp-admin/post-new.php5.89 ▲0.00102.38 ▼3.20
Media Library /wp-admin/upload.php3.23 ▲0.0035.66 ▼0.53

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

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,789 ▲314.17 ▼0.471.62 ▼0.1844.15 ▼0.31
Dashboard /wp-admin2,192 ▲185.56 ▼0.02121.56 ▲33.9659.77 ▲17.88
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0040.21 ▲4.5435.37 ▼2.80
Add New Post /wp-admin/post-new.php1,526 ▼023.68 ▲0.39619.60 ▼24.4148.92 ▼7.87
Media Library /wp-admin/upload.php1,400 ▲64.22 ▼0.01102.10 ▲4.4144.45 ▲0.81

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% 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)
Good news, no errors were detected

SRP 50% 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
The following issues need your attention
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-woo-product-social-share/images/data/template.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-woo-product-social-share/includes/wpsi_enqueue.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-woo-product-social-share/includes/wpsi_modal_template.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-woo-product-social-share/includes/wpsi_render_front_icons.php:2

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 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Select your button position where you need to show social icons.) image missing
You can take inspiration from this readme.txt

wp-woo-product-social-share/wpsi-social-share-for-woocommerce.php 85% from 13 tests

This is the main PHP file of "Social Share For WooCommerce" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-woo-product-social-share.php" instead of "wpsi-social-share-for-woocommerce.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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 plugin2,695 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
CSS515132,088
PHP13277156448
PO File14649112
JavaScript6261147

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.34
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
4 PNG files occupy 0.05MB with 0.04MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon/icon.png3.29KB1.63KB▼ 50.49%
images/icon/square.png16.25KB1.94KB▼ 88.07%
images/icon/rounded.png16.49KB2.14KB▼ 87.02%
images/icon/circle.png18.07KB2.97KB▼ 83.56%