68% social-rocket

Code Review | Social Rocket - Social Sharing Plugin

WordPress plugin Social Rocket - Social Sharing Plugin scored68%from 54 tests.

About plugin

  • Plugin page: social-rocket
  • Plugin version: 1.3.3
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.0
  • WordPress version: 6.3.1
  • First release: May 17, 2019
  • Latest release: Sep 14, 2022
  • Number of updates: 48
  • Update frequency: every 25.3 days
  • Top authors: socialrocket (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

3,000+ active /45,369 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲2.29MB] [CPU: ▲12.29ms] Passed 4 tests

This is a short check of server-side resources used by Social Rocket - Social Sharing Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.47 ▲1.0144.50 ▲3.52
Dashboard /wp-admin6.24 ▲2.9360.11 ▲10.33
Posts /wp-admin/edit.php6.24 ▲2.8861.93 ▲15.29
Add New Post /wp-admin/post-new.php8.24 ▲2.35122.45 ▲30.04
Media Library /wp-admin/upload.php6.24 ▲3.0054.35 ▲20.01
Social Rocket Callbacks /wp-admin/admin.php?page=social_rocket_callbacks6.2444.78
License Keys /wp-admin/admin.php?page=social_rocket_license_keys6.2444.38
Floating Buttons /wp-admin/admin.php?page=social_rocket_floating_buttons6.2451.99
Click to Tweet /wp-admin/admin.php?page=social_rocket_click_to_tweet6.2477.50
Get Started /wp-admin/admin.php?page=social_rocket6.2445.87
Inline Buttons /wp-admin/admin.php?page=social_rocket_inline_buttons6.2450.28
Settings /wp-admin/admin.php?page=social_rocket_settings6.2448.75

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 94 new files
Database: 2 new tables, 8 new options
New tables
wp_social_rocket_count_data
wp_social_rocket_count_queue
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
social_rocket_settings
social_rocket_admin_notices
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Social Rocket - Social Sharing Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,976 ▲23014.22 ▼0.136.33 ▲4.5137.14 ▼4.98
Dashboard /wp-admin2,274 ▲945.04 ▼0.5396.78 ▲1.7242.41 ▲5.12
Posts /wp-admin/edit.php2,224 ▲1242.17 ▲0.1446.24 ▲5.6135.66 ▼2.68
Add New Post /wp-admin/post-new.php6,702 ▲5,16728.25 ▲10.23910.06 ▲293.6250.48 ▼9.64
Media Library /wp-admin/upload.php1,486 ▲834.63 ▲0.41100.47 ▼1.7744.27 ▲2.49
Social Rocket Callbacks /wp-admin/admin.php?page=social_rocket_callbacks8752.1729.3726.35
License Keys /wp-admin/admin.php?page=social_rocket_license_keys1,0092.2832.8630.49
Floating Buttons /wp-admin/admin.php?page=social_rocket_floating_buttons8,4973.47306.3841.99
Click to Tweet /wp-admin/admin.php?page=social_rocket_click_to_tweet1,9493.3675.9150.79
Get Started /wp-admin/admin.php?page=social_rocket1,0382.3032.1429.53
Inline Buttons /wp-admin/admin.php?page=social_rocket_inline_buttons12,8324.41304.3440.43
Settings /wp-admin/admin.php?page=social_rocket_settings1,6142.3032.1028.64

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_social_rocket_count_data
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • social_rocket_admin_notices
    • can_compress_scripts
    • theysaidso_admin_options
    • social_rocket_settings
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=social_rocket_settings
    • > User warning in wp-includes/formatting.php+5526
    Warning: wp_strip_all_tags expects parameter #1 ($text) to be a string, object given.

SRP 50% 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
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/social-rocket/vendor/wp-background-processing/wp-background-processing.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Async_Request' not found in wp-content/plugins/social-rocket/vendor/wp-background-processing/classes/wp-background-process.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

social-rocket/social-rocket.php Passed 13 tests

"Social Rocket - Social Sharing Plugin" version 1.3.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
30 characters long description:
Social Sharing... to the Moon!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected34,895 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
PHP272,1061,94611,401
CSS163,94617810,592
SVG3009,552
JavaScript55885183,228
Markdown1540104
JSON10018

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity83.61
▷ Minimum class complexity2.00
▷ Maximum class complexity680.00
Average method complexity5.91
▷ Minimum method complexity1.00
▷ Maximum method complexity81.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes211.11%
▷ Concrete classes1688.89%
▷ Final classes00.00%
Methods305
▷ Static methods4013.11%
▷ Public methods20767.87%
▷ Protected methods9832.13%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants90
▷ Global constants44.44%
▷ Class constants8695.56%
▷ Public constants86100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
12 PNG files occupy 0.12MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/sidebar-1.png12.76KB4.66KB▼ 63.49%
admin/img/social-image-placeholder.png16.04KB7.54KB▼ 52.96%
admin/img/intro-floating.png5.47KB3.05KB▼ 44.24%
admin/img/intro-social-extras.png4.02KB2.04KB▼ 49.11%
admin/img/intro-inline.png5.40KB3.06KB▼ 43.33%