84% scriptless-social-sharing

Code Review | Scriptless Social Sharing

WordPress plugin Scriptless Social Sharing scored84%from 54 tests.

About plugin

  • Plugin page: scriptless-social...
  • Plugin version: 3.2.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4
  • WordPress version: 6.3.1
  • First release: Mar 1, 2016
  • Latest release: Nov 11, 2023
  • Number of updates: 70
  • Update frequency: every 40.2 days
  • Top authors: littler.chicken (100%)

Code review

54 tests

User reviews

66 reviews

Install metrics

10,000+ active /155,928 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.36MB] [CPU: ▲2.95ms] Passed 4 tests

Analyzing server-side resources used by Scriptless Social Sharing
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.4247.83 ▲3.84
Dashboard /wp-admin3.65 ▲0.3548.31 ▲0.44
Posts /wp-admin/edit.php3.73 ▲0.3760.34 ▲16.95
Add New Post /wp-admin/post-new.php6.32 ▲0.4486.21 ▲2.56
Media Library /wp-admin/upload.php3.51 ▲0.2835.67 ▲4.95
Scriptless Social Sharing /wp-admin/options-general.php?page=scriptlesssocialsharing3.5934.27

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 76 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Scriptless Social Sharing
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲4314.33 ▲0.011.89 ▲0.1342.51 ▲3.05
Dashboard /wp-admin2,202 ▲275.60 ▼0.0885.38 ▼31.5239.67 ▼4.61
Posts /wp-admin/edit.php2,283 ▲1863.66 ▲1.69106.31 ▲70.4535.32 ▼2.30
Add New Post /wp-admin/post-new.php6,433 ▲4,90727.18 ▲4.03925.21 ▲217.5641.08 ▼20.76
Media Library /wp-admin/upload.php1,395 ▼84.18 ▲0.0190.58 ▼7.2044.01 ▼3.99
Scriptless Social Sharing /wp-admin/options-general.php?page=scriptlesssocialsharing1,3002.0137.7833.66

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 21× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/scriptless-social-sharing/includes/settings/sections.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'ScriptlessSocialSharingButton' not found in wp-content/plugins/scriptless-social-sharing/includes/buttons/class-scriptlesssocialsharing-button-pocket.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'ScriptlessSocialSharingOutput' not found in wp-content/plugins/scriptless-social-sharing/includes/output/class-scriptlesssocialsharing-output-shortcode.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ScriptlessSocialSharingButton' not found in wp-content/plugins/scriptless-social-sharing/includes/buttons/class-scriptlesssocialsharing-button-fallback.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/scriptless-social-sharing/includes/class-scriptlesssocialsharing-button-maker.php:166
    • > PHP Fatal error
      Uncaught Error: Class 'ScriptlessSocialSharingButton' not found in wp-content/plugins/scriptless-social-sharing/includes/buttons/class-scriptlesssocialsharing-button-whatsapp.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'ScriptlessSocialSharingButton' not found in wp-content/plugins/scriptless-social-sharing/includes/buttons/class-scriptlesssocialsharing-button-facebook.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'ScriptlessSocialSharingOutputShortcode' not found in wp-content/plugins/scriptless-social-sharing/includes/output/class-scriptlesssocialsharing-output-block.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/scriptless-social-sharing/includes/settings/fields.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'ScriptlessSocialSharingButton' not found in wp-content/plugins/scriptless-social-sharing/includes/buttons/class-scriptlesssocialsharing-button-sms.php:9

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 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
3 plugin tags: sharing buttons, social networks, social sharing

scriptless-social-sharing/scriptless-social-sharing.php Passed 13 tests

"Scriptless Social Sharing" version 3.2.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
43 characters long description:
A scriptless plugin to add sharing buttons.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin3,224 lines of code in 73 files:
LanguageFilesBlank linesComment linesLines of code
PHP374381,6742,533
JavaScript64371301
PO File17993288
SVG2525098
CSS4004

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity9.67
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes30
▷ Abstract classes13.33%
▷ Concrete classes2996.67%
▷ Final classes00.00%
Methods202
▷ Static methods10.50%
▷ Public methods6331.19%
▷ Protected methods10350.99%
▷ Private methods3617.82%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected