78% sosh-share-buttons

Code Review | Sosh Share Buttons

WordPress plugin Sosh Share Buttons scored78%from 54 tests.

About plugin

  • Plugin page: sosh-share-buttons
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.4-5.5
  • WordPress version: 6.3.1
  • First release: Apr 15, 2020
  • Latest release: Aug 19, 2020
  • Number of updates: 14
  • Update frequency: every 9.0 days
  • Top authors: abage (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /557 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.30MB] [CPU: ▲122.38ms] Passed 4 tests

A check of server-side resources used by Sosh Share Buttons
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.03755.38 ▲715.30
Dashboard /wp-admin3.32 ▲0.0251.73 ▲0.75
Posts /wp-admin/edit.php3.38 ▲0.0248.71 ▼5.45
Add New Post /wp-admin/post-new.php4.62 ▼1.26594.99 ▲491.36
Media Library /wp-admin/upload.php3.25 ▲0.0238.13 ▲2.87

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
sosh_share_buttons_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Sosh Share Buttons
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,008 ▲24713.55 ▼0.819.06 ▲7.3543.65 ▲0.87
Dashboard /wp-admin2,211 ▲345.57 ▲0.0284.51 ▼7.7537.79 ▼7.09
Posts /wp-admin/edit.php2,116 ▲162.04 ▲0.0034.15 ▼5.5233.01 ▼1.36
Add New Post /wp-admin/post-new.php1,538 ▲1023.20 ▲0.05610.58 ▼59.2449.59 ▼9.45
Media Library /wp-admin/upload.php1,416 ▲194.17 ▼0.0298.57 ▼5.2445.21 ▲1.03

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • sosh_share_buttons_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | 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 output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/sosh-share-buttons/sosh.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sosh-share-buttons/inc/functions-help.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/sosh-share-buttons/inc/inc.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes: Please take inspiration from this readme.txt

sosh-share-buttons/sosh.php 92% from 13 tests

The main file in "Sosh Share Buttons" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("sosh-share-buttons.php" instead of "sosh.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected1,014 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
CSS312394529
PHP415067380
JavaScript414487
SVG16018

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.67
Average class complexity90.00
▷ Minimum class complexity90.00
▷ Maximum class complexity90.00
Average method complexity6.24
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods423.53%
▷ Public methods1270.59%
▷ Protected methods00.00%
▷ Private methods529.41%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin