58% wp-social-broadcast

Code Review | WP Social Broadcast

WordPress plugin WP Social Broadcast scored58%from 54 tests.

About plugin

  • Plugin page: wp-social-broadcast
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 25, 2014
  • Latest release: Sep 28, 2016
  • Number of updates: 24
  • Update frequency: every 37.0 days
  • Top authors: dreamyourcareer (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /2,068 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼17.66ms] Passed 4 tests

A check of server-side resources used by WP Social Broadcast
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.95 ▼0.5118.32 ▼29.76
Dashboard /wp-admin3.59 ▲0.2945.35 ▼3.61
Posts /wp-admin/edit.php3.40 ▲0.0431.63 ▼20.45
Add New Post /wp-admin/post-new.php6.11 ▲0.2388.75 ▼16.81
Media Library /wp-admin/upload.php3.45 ▲0.2335.46 ▼0.94

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 209 new files
Database: 2 new tables, 9 new options
New tables
wp_wsi_stats
wp_wsi_queue
New WordPress options
widget_wsi_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
wsi-version
wsi_settings
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WP Social Broadcast
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲7813.25 ▼1.124.03 ▲2.1243.97 ▼0.17
Dashboard /wp-admin2,220 ▲375.81 ▲0.78105.81 ▼6.5040.48 ▼2.33
Posts /wp-admin/edit.php2,109 ▲202.05 ▼0.1134.88 ▼4.9932.79 ▲1.80
Add New Post /wp-admin/post-new.php1,531 ▲1722.85 ▲5.25632.70 ▼69.8858.76 ▲1.91
Media Library /wp-admin/upload.php1,411 ▲234.22 ▲0.0099.06 ▼5.9745.10 ▼3.14

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% 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 tables were found after uninstall: 2 tables
    • wp_wsi_queue
    • wp_wsi_stats
  • Zombie WordPress options detected upon uninstall: 9 options
    • widget_wsi_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • wsi-version
    • theysaidso_admin_options
    • widget_recent-comments
    • wsi_settings

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-social-broadcast/hybridauth/index.php
    • > /wp-content/plugins/wp-social-broadcast/test.php
    • > /wp-content/plugins/wp-social-broadcast/uploads/index.php
  • 28× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Hybrid_Provider_Model' not found in wp-content/plugins/wp-social-broadcast/hybridauth/Hybrid/Provider_Model_OAuth2.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-social-broadcast/templates/popup/live-upload.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Hybrid_Provider_Model_OAuth2' not found in wp-content/plugins/wp-social-broadcast/hybridauth/Hybrid/Providers/foursquare.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-social-broadcast/classes/class.Wsi_Widget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Hybrid_Provider_Model' not found in wp-content/plugins/wp-social-broadcast/hybridauth/Hybrid/Provider_Model_OpenID.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Hybrid_Provider_Model_OAuth1' not found in wp-content/plugins/wp-social-broadcast/hybridauth/Hybrid/Providers/yahoo.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Hybrid_Provider_Model_OpenID' not found in wp-content/plugins/wp-social-broadcast/hybridauth/Hybrid/Providers/aol.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-social-broadcast/admin/sidebar.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Hybrid_Provider_Model_OAuth1' not found in wp-content/plugins/wp-social-broadcast/hybridauth/Hybrid/Providers/twitter.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/wp-social-broadcast/admin/header.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% 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
Attributes that require attention:
  • Contributors: Plugin contributors not specified
You can look at the official readme.txt

wp-social-broadcast/wp-social-invitations.php 85% from 13 tests

The main file in "WP Social Broadcast" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-social-broadcast.php" instead of "wp-social-invitations.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 189 characters long)

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Almost there! Just fix the following issues
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/wp-social-broadcast/hybridauth/Hybrid/thirdparty/Facebook/fb_ca_chain_bundle.crt
12,971 lines of code in 85 files:
LanguageFilesBlank linesComment linesLines of code
PHP652,6734,5069,932
JavaScript91883951,786
CSS52311657
PO File1206223537
HTML32328
SVG10019
XML10012

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity28.31
▷ Minimum class complexity1.00
▷ Maximum class complexity188.00
Average method complexity3.83
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes54
▷ Abstract classes47.41%
▷ Concrete classes5092.59%
▷ Final classes00.00%
Methods533
▷ Static methods6211.63%
▷ Public methods41477.67%
▷ Protected methods9918.57%
▷ Private methods203.75%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants29
▷ Global constants310.34%
▷ Class constants2689.66%
▷ Public constants26100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
107 compressed PNG files occupy 0.22MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/32x32/icondock/vimeo.png1.47KB1.35KB▼ 7.92%
assets/img/32x32/wpzoom/flickr.png1.00KB1.15KB0.00%
admin/assets/img/wpzoom/hyves.png1.23KB1.25KB0.00%
assets/img/32x32/icondock/myspace.png1.59KB1.41KB▼ 11.66%
assets/img/32x32/wpzoom/steam.png1.31KB1.05KB▼ 19.66%