10% widget-social-share

Code Review | WSS: Widget Social Share

WordPress plugin WSS: Widget Social Share scored10%from 54 tests.

About plugin

  • Plugin page: widget-social-share
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.1
  • WordPress version: 6.3.1
  • First release: Aug 1, 2016
  • Latest release: Mar 7, 2019
  • Number of updates: 22
  • Update frequency: every 43.1 days
  • Top authors: snehaladdweb (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /959 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/widget-social-share/widget-social-share.php+35
    Methods with the same name as their class will not be constructors in a future version of PHP; wss_link_to_social_networks has a deprecated constructor

Server metrics [RAM: ▼1.92MB] [CPU: ▼53.62ms] Passed 4 tests

An overview of server-side resources used by WSS: Widget Social Share
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.394.66 ▼31.17
Dashboard /wp-admin2.10 ▼1.255.30 ▼57.10
Posts /wp-admin/edit.php2.10 ▼1.265.77 ▼40.91
Add New Post /wp-admin/post-new.php2.10 ▼3.795.56 ▼85.31
Media Library /wp-admin/upload.php2.10 ▼1.136.27 ▼29.17
wss Settings /wp-admin/options-general.php?page=widget-social-share/widget-social-share.php2.106.03

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WSS: Widget Social Share
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8814.09 ▼0.262.00 ▲0.3847.52 ▲5.41
Dashboard /wp-admin2,212 ▲355.64 ▲0.0797.98 ▲9.0842.65 ▲2.73
Posts /wp-admin/edit.php2,123 ▲231.95 ▼0.0435.05 ▲0.5534.00 ▼3.41
Add New Post /wp-admin/post-new.php1,542 ▲1422.81 ▼0.12630.58 ▼23.9251.67 ▲2.48
Media Library /wp-admin/upload.php1,420 ▲204.17 ▲0.06103.82 ▼11.4143.85 ▼3.85
wss Settings /wp-admin/options-general.php?page=widget-social-share/widget-social-share.php8122.0326.3434.70

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/widget-social-share/widget-social-share.php+35
    Methods with the same name as their class will not be constructors in a future version of PHP; wss_link_to_social_networks has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_wss_link_to_social_networks
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=widget-social-share/widget-social-share.php
    • > Deprecated in wp-content/plugins/widget-social-share/widget-social-share.php+35
    Methods with the same name as their class will not be constructors in a future version of PHP; wss_link_to_social_networks has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=widget-social-share/widget-social-share.php
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in wss_link_to_social_networks is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=widget-social-share/widget-social-share.php
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/widget-social-share/widget-social-share.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: widget, share, widget social share, social

widget-social-share/widget-social-share.php Passed 13 tests

"WSS: Widget Social Share" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
88 characters long description:
It displays links to Facebook, Twitter and RSS feeds.This plugin is for created as demo.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin110 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP127824110

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.06
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 1.01MB with 0.55MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icons/google_plus.png3.55KB2.03KB▼ 42.94%
icons/Social-Media-Logo.png1,027.21KB37.92KB▼ 96.31%
icons/twitter.png3.87KB2.04KB▼ 47.20%
icons/facebook.png2.01KB1.40KB▼ 30.53%