77% product-sharing-buttons

Code Review | Social Sharing Button

WordPress plugin Social Sharing Button scored77%from 54 tests.

About plugin

  • Plugin page: product-sharing-b...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Jun 18, 2021
  • Latest release: Jun 13, 2022
  • Number of updates: 6
  • Update frequency: every 60.2 days
  • Top authors: ok9xnirab (50%)istiaqnirab (50%)naminbd (33.33%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /385 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.09ms] Passed 4 tests

A check of server-side resources used by Social Sharing Button
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0447.99 ▲9.51
Dashboard /wp-admin3.33 ▼0.0244.83 ▼10.25
Posts /wp-admin/edit.php3.38 ▲0.0245.00 ▲3.74
Add New Post /wp-admin/post-new.php5.91 ▲0.0281.78 ▼8.18
Media Library /wp-admin/upload.php3.25 ▲0.0237.86 ▲6.33

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 38 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_\springdevs\ssb\illuminate\sociallinks
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Social Sharing Button
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲5014.45 ▲0.181.99 ▲0.2243.82 ▲3.80
Dashboard /wp-admin2,207 ▲275.64 ▼0.0294.27 ▲6.2243.15 ▼1.95
Posts /wp-admin/edit.php2,112 ▲121.98 ▼0.0333.30 ▼5.3035.90 ▲4.67
Add New Post /wp-admin/post-new.php1,543 ▲1523.09 ▼0.07663.13 ▼2.5354.89 ▼10.42
Media Library /wp-admin/upload.php1,415 ▲124.13 ▼0.13119.75 ▲21.0946.39 ▲1.96

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_\springdevs\ssb\illuminate\sociallinks
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/product-sharing-buttons/templates/3.php
    • > /wp-content/plugins/product-sharing-buttons/templates/2.php
    • > /wp-content/plugins/product-sharing-buttons/templates/4.php
    • > /wp-content/plugins/product-sharing-buttons/templates/1.php
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/product-sharing-buttons/templates/3.php on line 3
    • > PHP Notice
      Undefined variable: social_buttons in wp-content/plugins/product-sharing-buttons/templates/2.php on line 3
    • > PHP Notice
      Undefined variable: social_buttons in wp-content/plugins/product-sharing-buttons/templates/4.php on line 3
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/product-sharing-buttons/templates/4.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/product-sharing-buttons/includes/Illuminate/SocialLinks.php:11
    • > PHP Notice
      Undefined variable: social_buttons in wp-content/plugins/product-sharing-buttons/templates/3.php on line 3
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/product-sharing-buttons/templates/2.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/product-sharing-buttons/includes/Admin/views/settings.php:2
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/product-sharing-buttons/templates/1.php on line 3
    • > PHP Notice
      Undefined variable: social_buttons in wp-content/plugins/product-sharing-buttons/templates/1.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Please fix this invalid URI: ""
Please take inspiration from this readme.txt

product-sharing-buttons/social-sharing-buttons.php 77% from 13 tests

The main PHP file in "Social Sharing Button" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Main file name: The principal plugin file should be the same as the plugin slug ("product-sharing-buttons.php" instead of "social-sharing-buttons.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected1,425 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP293084261,290
CSS285130
JSON1005

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity9.56
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces0
Traits1
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes16.67%
Methods80
▷ Static methods1417.50%
▷ Public methods7695.00%
▷ Protected methods00.00%
▷ Private methods45.00%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants7
▷ Global constants685.71%
▷ Class constants114.29%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin