78% social-master

Code Review | TechGasp Social Master

WordPress plugin TechGasp Social Master scored78%from 54 tests.

About plugin

  • Plugin page: social-master
  • Plugin version: 5.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.7
  • WordPress version: 6.3.1
  • First release: May 12, 2013
  • Latest release: Mar 11, 2021
  • Number of updates: 129
  • Update frequency: every 22.2 days
  • Top authors: TechGasp (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

70+ active /26,824 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼7.72ms] Passed 4 tests

An overview of server-side resources used by TechGasp Social Master
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0639.63 ▼6.24
Dashboard /wp-admin3.38 ▲0.0750.20 ▼4.36
Posts /wp-admin/edit.php3.43 ▲0.0751.33 ▲0.31
Add New Post /wp-admin/post-new.php5.96 ▲0.0785.13 ▼17.59
Media Library /wp-admin/upload.php3.30 ▲0.0739.77 ▼2.67
Add-ons /wp-admin/admin.php?page=social-master-admin-addons3.3033.40
Settings /wp-admin/admin.php?page=social-master-admin-settings-wide3.5238.76
Social Master /wp-admin/admin.php?page=social-master3.2931.94

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_social_master_widget_basic
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for TechGasp Social Master
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7314.27 ▼0.391.81 ▼0.1342.32 ▼1.15
Dashboard /wp-admin2,213 ▲395.51 ▼0.1186.23 ▼12.2469.16 ▲25.67
Posts /wp-admin/edit.php2,136 ▲361.98 ▼0.0438.65 ▼0.6236.24 ▼9.66
Add New Post /wp-admin/post-new.php1,705 ▲17722.51 ▼0.64759.06 ▲93.2576.68 ▲22.48
Media Library /wp-admin/upload.php1,433 ▲334.23 ▲0.07100.75 ▼22.6878.26 ▲29.24
Add-ons /wp-admin/admin.php?page=social-master-admin-addons1,0841.9924.4533.29
Settings /wp-admin/admin.php?page=social-master-admin-settings-wide1,4822.1822.6432.13
Social Master /wp-admin/admin.php?page=social-master1,7828.02196.6494.52

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_social_master_widget_basic
    • widget_recent-comments
    • 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 everything seems fine, this is not an exhaustive test

SRP 50% 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 fix the following
  • 13× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_custom() in wp-content/plugins/social-master/includes/social-master-twitter.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_custom() in wp-content/plugins/social-master/includes/social-master-google.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/social-master/includes/social-master-admin-settings-wide.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-master/includes/social-master-widget-basic.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_path() in wp-content/plugins/social-master/includes/social-master-admin-settings-wide-table.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_path() in wp-content/plugins/social-master/includes/social-master-admin-table-news.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/social-master/includes/social-master-admin-addons.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/social-master/social-master.php:52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_custom() in wp-content/plugins/social-master/includes/social-master-facebook.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_path() in wp-content/plugins/social-master/includes/social-master-admin-addons-table.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=social-master
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
    • > GET request to /wp-admin/admin.php?page=social-master
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.
    • > GET request to /wp-admin/admin.php?page=social-master
    • > Deprecation (warning) in unknown
    https://static.xx.fbcdn.net/rsrc.php/v3/yD/r/CxzjCMQABR5.js?_nc_x=Ij3Wp8lg5Kz 271 Listener added for a synchronous 'DOMSubtreeModified' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.
    • > GET request to /wp-admin/admin.php?page=social-master
    • > Console-api (severe) in unknown
    https://static.xx.fbcdn.net/rsrc.php/v3/yD/r/CxzjCMQABR5.js?_nc_x=Ij3Wp8lg5Kz 60:573 "ErrorUtils caught an error:\n\nCannot listen to an undefined element. [Caught in: Tried to listen to element of type click]\n\nSubsequent non-fatal errors won't be logged; see https://fburl.com/debugjs."

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt is a good inspiration

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

The principal PHP file in "TechGasp Social Master" v. 5.1.4 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 416 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin1,285 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP15411021,285

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 issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity11.57
▷ Minimum class complexity1.00
▷ Maximum class complexity55.00
Average method complexity7.73
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods11
▷ Static methods218.18%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
9 PNG files occupy 0.28MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/techgasp-admin-addons-widgets.png17.08KB16.02KB▼ 6.22%
images/techgasp-admin-addons-updater.png14.03KB13.02KB▼ 7.21%
images/techgasp-check-yes.png22.22KB7.59KB▼ 65.83%
images/techgasp-hr.png0.94KB0.13KB▼ 86.60%
images/techgasp-minilogo-16.png1.86KB0.92KB▼ 50.87%