10% socialize

Code Review | Socialize

WordPress plugin Socialize scored10%from 54 tests.

About plugin

  • Plugin page: socialize
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-3.8
  • WordPress version: 6.3.1
  • First release: Sep 10, 2009
  • Latest release: Dec 1, 2013
  • Number of updates: 50
  • Update frequency: every 30.9 days
  • Top authors: JonBishop (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

500+ active /194,975 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/socialize/frontend/socialize-og.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; SocializeGraph has a deprecated constructor

Server metrics [RAM: ▼0.49MB] [CPU: ▼18.62ms] Passed 4 tests

Analyzing server-side resources used by Socialize
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.88 ▼30.03
Dashboard /wp-admin3.34 ▲0.0446.45 ▲1.52
Posts /wp-admin/edit.php3.20 ▼0.1630.24 ▼16.79
Add New Post /wp-admin/post-new.php5.47 ▼0.4170.29 ▼27.24
Media Library /wp-admin/upload.php3.26 ▲0.0432.59 ▼0.41
Socialize /wp-admin/options-general.php?page=socialize3.2127.87

Server storage [IO: ▲0.32MB] [DB: ▲0.08MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
socialize_settings10
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Socialize
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲16314.31 ▼0.0728.81 ▲27.1341.25 ▲3.86
Dashboard /wp-admin2,214 ▲254.87 ▼0.17101.92 ▼13.7938.90 ▼14.01
Posts /wp-admin/edit.php2,101 ▲332.23 ▲0.1834.72 ▼12.3630.02 ▼4.03
Add New Post /wp-admin/post-new.php6,453 ▲4,93626.30 ▲8.77920.60 ▲318.3778.03 ▲16.50
Media Library /wp-admin/upload.php1,396 ▲114.29 ▲0.07101.98 ▼3.0143.70 ▲1.94
Socialize /wp-admin/options-general.php?page=socialize1,3875.2365.3454.37

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • socialize_settings10
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=socialize
    • > Deprecated in wp-content/plugins/socialize/admin/socialize-admin.php+991
    Non-static method socializeWP::get_options() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=socialize
    • > Deprecated in wp-content/plugins/socialize/admin/socialize-admin.php+1066
    Non-static method SocializeServices::get_button_array() should not be called statically

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/socialize/socialize.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/socialize/frontend/socialize-shortcodes.php:49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/socialize/frontend/templates/templates.php:55

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=socialize
    • > Network (severe)
    https://www.coinbase.com/assets/button.js - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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 43 tag instead of maximum 10
  • Screenshots: These screenshots do not have images: #1 (Some buttons in the content), #2 (The box displays below posts), #3 (Default button set up, drag and drop to rearrange), #4 (The settings panel)
You can take inspiration from this readme.txt

socialize/socialize.php Passed 13 tests

This is the main PHP file of "Socialize" version 2.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
51 characters long description:
Adds actionable social sharing buttons to your site

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin2,419 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP72251541,936
CSS2713294
JavaScript7112189

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity55.00
▷ Minimum class complexity4.00
▷ Maximum class complexity171.00
Average method complexity5.98
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods65
▷ Static methods00.00%
▷ Public methods65100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
10 PNG files occupy 0.18MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/openshareicon-32x32.png5.43KB1.68KB▼ 69.09%
screenshot-3.png18.81KB6.23KB▼ 66.86%
images/socialize-icon.png0.65KB0.69KB0.00%
images/sm-icons.png5.67KB2.64KB▼ 53.48%
images/wordpressorg.png0.65KB0.61KB▼ 5.56%