84% social-share-button

Code Review | Social Share Button

WordPress plugin Social Share Button scored84%from 54 tests.

About plugin

  • Plugin page: social-share-button
  • Plugin version: 2.1.12
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 28, 2014
  • Latest release: Apr 15, 2023
  • Number of updates: 103
  • Update frequency: every 31.5 days
  • Top authors: pickplugins (41.75%)wpkids (27.18%)kentothemes (25.24%)paratheme (8.74%)

Code review

54 tests

User reviews

17 reviews

Install metrics

2,000+ active /120,253 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.51MB] [CPU: ▼4.25ms] Passed 4 tests

Analyzing server-side resources used by Social Share Button
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.96 ▲0.5046.96 ▲8.09
Dashboard /wp-admin3.81 ▲0.5055.86 ▲2.44
Posts /wp-admin/edit.php3.92 ▲0.5653.66 ▲1.73
Add New Post /wp-admin/post-new.php6.41 ▲0.5289.37 ▼20.57
Media Library /wp-admin/upload.php3.73 ▲0.5039.36 ▼0.58
Migrate /wp-admin/admin.php?page=social_share_button_migrate3.7033.74
Migrate /wp-admin/admin.php?page=social_share_button_migrate_settings3.7135.91

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 213 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Social Share Button
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲16313.45 ▼1.119.32 ▲7.4842.88 ▲3.88
Dashboard /wp-admin2,224 ▲435.55 ▼0.1584.97 ▼17.7636.99 ▼6.44
Posts /wp-admin/edit.php2,133 ▲332.00 ▼0.0138.64 ▼3.1636.35 ▼0.98
Add New Post /wp-admin/post-new.php1,574 ▲4323.31 ▲0.13643.25 ▼49.7839.52 ▼21.25
Media Library /wp-admin/upload.php1,429 ▲294.20 ▼0.01103.46 ▼11.1646.72 ▲3.30
Migrate /wp-admin/admin.php?page=social_share_button_migrate7962.0224.9722.83
Migrate /wp-admin/admin.php?page=social_share_button_migrate_settings7932.0225.7924.36

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=social_share_button_migrate
    • > Notice in wp-content/plugins/social-share-button/includes/menu/migrate.php+4
    Undefined index: _wpnonce

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots require images: #8 (screenshot 8), #9 (screenshot 9), #10 (screenshot 10)
The official readme.txt is a good inspiration

social-share-button/social-share-button.php Passed 13 tests

The main PHP script in "Social Share Button" version 2.1.12 is automatically included on every request by WordPress
21 characters long description:
Awesome Share Button.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin26,089 lines of code in 101 files:
LanguageFilesBlank linesComment linesLines of code
SVG40011,282
CSS44996745,550
JavaScript51,5484045,332
PHP462,4764763,458
PO File2225278467

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity109.00
▷ Minimum class complexity1.00
▷ Maximum class complexity641.00
Average method complexity14.22
▷ Minimum method complexity1.00
▷ Maximum method complexity73.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods49
▷ Static methods00.00%
▷ Public methods49100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.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
38 PNG files occupy 0.31MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/images/theme1.png3.14KB1.87KB▼ 40.50%
assets/admin/images/theme10.png1.98KB1.39KB▼ 29.64%
assets/admin/images/theme31.png19.40KB3.63KB▼ 81.30%
assets/admin/images/theme15.png1.44KB0.73KB▼ 49.18%
assets/admin/images/theme23.png6.71KB2.47KB▼ 63.23%