90% wp-social-buttons

Code Review | WP Social Buttons

WordPress plugin WP Social Buttons scored90%from 54 tests.

About plugin

  • Plugin page: wp-social-buttons
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.0
  • WordPress version: 6.3.1
  • First release: Aug 9, 2014
  • Latest release: Jul 4, 2022
  • Number of updates: 60
  • Update frequency: every 48.1 days
  • Top authors: india-web-developer (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active /31,101 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼6.99ms] Passed 4 tests

Server-side resources used by WP Social Buttons
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▼0.0129.57 ▼11.36
Dashboard /wp-admin3.41 ▲0.1148.56 ▼5.73
Posts /wp-admin/edit.php3.46 ▲0.1151.14 ▲1.54
Add New Post /wp-admin/post-new.php6.01 ▲0.1292.60 ▼9.63
Media Library /wp-admin/upload.php3.33 ▲0.1035.77 ▼1.24
WP Social Buttons /wp-admin/options-general.php?page=wpsb-settings3.3037.18

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WP Social Buttons
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲3714.27 ▼0.291.58 ▼0.4243.09 ▲0.02
Dashboard /wp-admin2,204 ▲305.57 ▼0.0892.29 ▼7.0642.02 ▼4.03
Posts /wp-admin/edit.php2,112 ▲92.04 ▲0.0937.06 ▼0.7432.81 ▼5.38
Add New Post /wp-admin/post-new.php1,534 ▲623.02 ▼0.38658.66 ▼6.7355.70 ▼10.01
Media Library /wp-admin/upload.php1,412 ▲124.25 ▲0.04103.21 ▼3.1047.48 ▲4.75
WP Social Buttons /wp-admin/options-general.php?page=wpsb-settings1,1582.0225.6141.56

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% 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
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
Please take inspiration from this readme.txt

wp-social-buttons/wp-social-buttons.php Passed 13 tests

Analyzing the main PHP file in "WP Social Buttons" version 2.2
91 characters long description:
"wp-social-buttons" is the very simple plugin to add official social buttons on your site!.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin378 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP24477365
CSS20413

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/hide-l.png2.37KB1.75KB▼ 26.23%
images/right_.png3.22KB1.86KB▼ 42.03%
images/rt.1.png3.13KB1.87KB▼ 40.31%
images/sharethis.png3.48KB2.53KB▼ 27.46%
images/right.png3.93KB2.29KB▼ 41.76%