83% social-share-floating-icons

Code Review | Social Share Buttons

WordPress plugin Social Share Buttons scored 83% from 54 tests.

About plugin

  • Plugin page: social-share-floa...
  • Plugin version: 3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.0
  • WordPress version: 5.8.1
  • First release: Jun 3, 2016
  • Latest release: Dec 9, 2018
  • Number of updates: 62
  • Update frequency: every 19.0 days
  • Top authors: arrowplugins (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active / 13,867 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼140.14ms] Passed 4 tests

Analyzing server-side resources used by Social Share Buttons
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1234.36 ▲10.19
Dashboard /wp-admin3.10 ▲0.0438.43 ▼5.58
Posts /wp-admin/edit.php3.18 ▲0.0845.27 ▼1.58
Add New Post /wp-admin/post-new.php5.46 ▲0.0389.42 ▼556.80
Media Library /wp-admin/upload.php3.04 ▲0.0434.44 ▲3.42

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 153 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Social Share Buttons
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,032 ▲43616.85 ▲1.2015.22 ▲4.9745.23 ▼3.55
Dashboard /wp-admin3,092 ▲1586.04 ▼0.18140.56 ▼30.14109.04 ▼0.30
Posts /wp-admin/edit.php2,861 ▲1222.77 ▲0.0468.96 ▲0.8889.62 ▼4.29
Add New Post /wp-admin/post-new.php1,723 ▲10818.90 ▼2.69394.59 ▲94.35109.39 ▲7.36
Media Library /wp-admin/upload.php1,929 ▲1225.11 ▲0.09161.83 ▲17.49120.33 ▲6.39

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Warning in wp-includes/class-wp-hook.php+303
    call_user_func_array() expects parameter 1 to be a valid callback, function 'wpassfi_delete_options' not found or invalid function name

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-share-floating-icons/social-share-floating-icons.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Social Share Buttons Settings Tab), #2 (Social Share Buttons Icons Selection Tab), #3 (Social Share Buttons Icons Manage Location Tab), #4 (Social Share Buttons Icons Setting Tab), #5 (Social Share Buttons Icons Themes Tab)
  • Tags: Please delete some tags, you are using 73 tag instead of maximum 10
You can take inspiration from this readme.txt

social-share-floating-icons/social-share-floating-icons.php Passed 13 tests

The main PHP script in "Social Share Buttons" version 3.0 is automatically included on every request by WordPress
73 characters long description:
Adds social floating icons on your Posts to share your content with style

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected6,503 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS24781675,454
PHP11129767
JavaScript1360282

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
146 PNG files occupy 1.68MB with 1.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-size.png23.25KB0.83KB▼ 96.42%
images/t3-pinterest.png15.21KB6.47KB▼ 57.47%
images/both-post.png18.86KB0.45KB▼ 97.60%
images/t19-google.png9.54KB4.44KB▼ 53.48%
images/t7-google.png15.90KB6.69KB▼ 57.93%