78% sharing-plus

Code Review | Sharing Plus - Social Sharing Icons

WordPress plugin Sharing Plus - Social Sharing Icons scored78%from 54 tests.

About plugin

  • Plugin page: sharing-plus
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Feb 2, 2019
  • Latest release: Jul 6, 2019
  • Number of updates: 4
  • Update frequency: every 38.5 days
  • Top authors: themecentury (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /12,656 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
Installer ran successfully

Server metrics [RAM: ▲0.55MB] [CPU: ▲0.77ms] Passed 4 tests

This is a short check of server-side resources used by Sharing Plus - Social Sharing Icons
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.04 ▲0.5844.92 ▲7.18
Dashboard /wp-admin4.12 ▲0.8251.43 ▲5.04
Posts /wp-admin/edit.php4.17 ▲0.8246.28 ▲2.94
Add New Post /wp-admin/post-new.php5.95 ▲0.0776.96 ▼12.10
Media Library /wp-admin/upload.php3.98 ▲0.7540.81 ▲7.26
Settings /wp-admin/admin.php?page=sharing-plus3.9635.01
Import / Export /wp-admin/admin.php?page=sharing-plus-import-export3.9636.72

Server storage [IO: ▲1.00MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 87 new files
Database: no new tables, 14 new options
New WordPress options
sharing_plus_sidebar
theysaidso_admin_options
widget_recent-posts
sharing_plus_version
widget_recent-comments
sharing_plus_themes
db_upgraded
can_compress_scripts
widget_sharing_plus_follower_widget
sharing_plus_inline
...

Browser metrics Passed 4 tests

Sharing Plus - Social Sharing Icons: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,973 ▲21214.71 ▲0.3445.10 ▲43.4344.08 ▲4.94
Dashboard /wp-admin2,244 ▲645.83 ▲0.1784.28 ▼3.3936.02 ▼6.21
Posts /wp-admin/edit.php2,195 ▲952.28 ▲0.2535.58 ▼1.0434.59 ▼0.65
Add New Post /wp-admin/post-new.php6,517 ▲4,98629.59 ▲6.53995.22 ▲352.8738.68 ▼12.49
Media Library /wp-admin/upload.php1,489 ▲864.52 ▲0.3994.26 ▼1.0085.18 ▲38.96
Settings /wp-admin/admin.php?page=sharing-plus2,5803.4270.4588.05
Import / Export /wp-admin/admin.php?page=sharing-plus-import-export9512.0628.4931.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 13 options
    • widget_recent-comments
    • sharing_plus_networks
    • sharing_plus_sidebar
    • db_upgraded
    • can_compress_scripts
    • sharing_plus_advanced
    • theysaidso_admin_options
    • sharing_plus_themes
    • sharing_plus_inline
    • widget_theysaidso_widget
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/sharing-plus/inc/widgets/templates/tcy-follower-display.php
  • 88× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: youtube_type in wp-content/plugins/sharing-plus/inc/widgets/templates/tcy-follower-display.php on line 19
    • > PHP Notice
      Undefined variable: pinterest_follower in wp-content/plugins/sharing-plus/inc/widgets/templates/tcy-follower-display.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/sharing-plus/inc/widgets/fields/tcy-termlist-field.php:7
    • > PHP Notice
      Undefined variable: facebook_text in wp-content/plugins/sharing-plus/inc/widgets/templates/tcy-follower-display.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/sharing-plus/inc/widgets/fields/tcy-upload-field.php:3
    • > PHP Notice
      Undefined variable: pinterest_text in wp-content/plugins/sharing-plus/inc/widgets/templates/tcy-follower-display.php on line 22
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/sharing-plus/inc/widgets/fields/tcy-master-widget.php:11
    • > PHP Notice
      Undefined variable: twitter_follower in wp-content/plugins/sharing-plus/inc/widgets/templates/tcy-follower-display.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/sharing-plus/inc/widgets/fields/tcy-radio-field.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/sharing-plus/inc/widgets/fields/tcy-icon-field.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: pinterest etc, twitter, facebook, social share, whatsapp...

sharing-plus/sharing-plus.php 92% from 13 tests

The main PHP file in "Sharing Plus - Social Sharing Icons" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 251 characters long)

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
No dangerous file extensions were detected14,484 lines of code in 66 files:
LanguageFilesBlank linesComment linesLines of code
PHP409821,0344,848
Sass312604,499
CSS46452973,994
SVG14013649
JavaScript49263490
INI1004

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity89.17
▷ Minimum class complexity10.00
▷ Maximum class complexity266.00
Average method complexity4.98
▷ Minimum method complexity1.00
▷ Maximum method complexity74.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes116.67%
▷ Concrete classes583.33%
▷ Final classes00.00%
Methods133
▷ Static methods00.00%
▷ Public methods13299.25%
▷ Protected methods00.00%
▷ Private methods10.75%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
12 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/whatsapp.png1.07KB0.96KB▼ 9.94%
assets/images/linkedin.png0.78KB0.68KB▼ 12.81%
assets/images/sharing_plus_grey_logo.png4.40KB4.43KB0.00%
assets/images/reddit.png0.94KB0.83KB▼ 11.04%
assets/images/twitter.png0.81KB0.71KB▼ 13.07%