78% social-hub

Code Review | Social Hub - Social Share Buttons

WordPress plugin Social Hub - Social Share Buttons scored78%from 54 tests.

About plugin

  • Plugin page: social-hub
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 6.3.1
  • First release: Jan 17, 2017
  • Latest release: Jan 23, 2017
  • Number of updates: 15
  • Update frequency: every 0.2 days
  • Top authors: krishan19 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,462 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.32MB] [CPU: ▼20.23ms] Passed 4 tests

A check of server-side resources used by Social Hub - Social Share Buttons
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0729.48 ▼13.24
Dashboard /wp-admin3.33 ▲0.0249.56 ▼17.76
Posts /wp-admin/edit.php3.38 ▲0.0251.07 ▲1.72
Add New Post /wp-admin/post-new.php4.62 ▼1.2740.72 ▼51.64
Media Library /wp-admin/upload.php3.25 ▲0.0238.03 ▲2.47

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Social Hub - Social Share Buttons
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲6114.37 ▲0.152.15 ▲0.0737.44 ▼2.41
Dashboard /wp-admin2,219 ▲425.60 ▼0.1090.45 ▼5.4540.93 ▲0.55
Posts /wp-admin/edit.php2,124 ▲242.00 ▼0.0341.15 ▲4.0937.74 ▲6.22
Add New Post /wp-admin/post-new.php1,547 ▲623.14 ▲4.79607.90 ▼16.6355.75 ▼10.72
Media Library /wp-admin/upload.php1,427 ▲274.18 ▼0.09102.13 ▲3.2945.40 ▼0.91

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • sssb_social_networks
    • widget_recent-posts
    • widget_theysaidso_widget

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/social-hub/templates/socials-links.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Gamajo_Template_Loader' not found in wp-content/plugins/social-hub/class-sssb-template-loader.php:8
    • > PHP Notice
      Trying to get property 'panelStyle' of non-object in wp-content/plugins/social-hub/templates/socials-links.php on line 5
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/social-hub/templates/socials-links.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser 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
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
Please take inspiration from this readme.txt

social-hub/social-hub.php 92% from 13 tests

"Social Hub - Social Share Buttons" version 1.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected741 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP8129352450
CSS28338290
Markdown1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity11.50
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods24
▷ Static methods729.17%
▷ Public methods2187.50%
▷ Protected methods312.50%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
PNG images were not found in this plugin