84% social-sharer-for-woo

Code Review | Social Sharer for WooComerce

WordPress plugin Social Sharer for WooComerce scored84%from 54 tests.

About plugin

  • Plugin page: social-sharer-for...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Nov 1, 2022
  • Latest release: Aug 27, 2023
  • Number of updates: 3
  • Update frequency: every 99.7 days
  • Top authors: sajjad67 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /596 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Social Sharer for WooComerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.76 ▲1.35
Dashboard /wp-admin3.31 ▲0.0045.42 ▼1.94
Posts /wp-admin/edit.php3.36 ▲0.0043.78 ▼5.08
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.23 ▼1.29
Media Library /wp-admin/upload.php3.23 ▲0.0036.84 ▲1.10

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Social Sharer for WooComerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▲0.181.77 ▲0.0143.65 ▼9.96
Dashboard /wp-admin2,206 ▲185.86 ▼0.03100.04 ▼7.0636.45 ▼6.55
Posts /wp-admin/edit.php2,089 ▼32.16 ▲0.1537.72 ▼2.0132.10 ▼3.92
Add New Post /wp-admin/post-new.php1,535 ▲1523.41 ▲0.19598.45 ▼87.7347.96 ▼8.65
Media Library /wp-admin/upload.php1,391 ▲64.32 ▲0.07102.19 ▼1.2342.37 ▲0.08

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/social-sharer-for-woo/includes/class.plugin.settings.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/social-sharer-for-woo/includes/class.render.front.icons.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: social-buttons, buttons, responsive-buttons, social, button...

social-sharer-for-woo/social-sharer-for-woo.php Passed 13 tests

"Social Sharer for WooComerce" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
93 characters long description:
Add attractive & responsive social sharing icons with link to your woocommerce product pages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin21,691 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
CSS79584411,146
JavaScript82,7798799,907
PHP517486436
JSON200202

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity25.50
▷ Minimum class complexity25.00
▷ Maximum class complexity26.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon/square.png2.06KB1.39KB▼ 32.45%
assets/icon/icon.png24.83KB13.94KB▼ 43.87%
assets/icon/circle.png3.57KB2.14KB▼ 39.97%
assets/icon/rounded.png2.36KB1.49KB▼ 37.07%