84% sgs-social-sharing-buttons

Code Review | SGS Social Sharing Buttons

WordPress plugin SGS Social Sharing Buttons scored84%from 54 tests.

About plugin

  • Plugin page: sgs-social-sharin...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.7.1
  • WordPress version: 6.3.1
  • First release: Feb 17, 2021
  • Latest release: Apr 16, 2021
  • Number of updates: 48
  • Update frequency: every 1.2 days
  • Top authors: adebo4all (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /600 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.18ms] Passed 4 tests

A check of server-side resources used by SGS Social Sharing Buttons
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.89 ▲0.88
Dashboard /wp-admin3.32 ▲0.0244.96 ▲2.64
Posts /wp-admin/edit.php3.37 ▲0.0249.13 ▲1.73
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.99 ▼9.97
Media Library /wp-admin/upload.php3.24 ▲0.0237.98 ▲3.90

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for SGS Social Sharing Buttons
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,881 ▲14613.18 ▼1.111.94 ▲0.3242.49 ▲2.98
Dashboard /wp-admin2,206 ▲174.86 ▼0.1498.80 ▼22.8638.91 ▼6.10
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0035.45 ▼4.9130.53 ▼5.93
Add New Post /wp-admin/post-new.php1,514 ▼2817.61 ▼0.54629.75 ▼8.4449.75 ▼2.81
Media Library /wp-admin/upload.php1,388 ▼04.24 ▲0.0495.18 ▼15.8344.88 ▲1.79

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% 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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/sgs-social-sharing-buttons/sgs-ssb.php
    • > /wp-content/plugins/sgs-social-sharing-buttons/includes/sgs-ssb-css.php
    • > /wp-content/plugins/sgs-social-sharing-buttons/includes/sgs-ssb-html.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
There were not plugin tags detected

sgs-social-sharing-buttons/sgs-ssb.php 85% from 13 tests

This is the main PHP file of "SGS Social Sharing Buttons" version 1.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 277 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("sgs-social-sharing-buttons.php" instead of "sgs-ssb.php")

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
Everything looks great! No dangerous files found in this plugin103 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP42113103

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.53
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected