10% social-media-follow-buttons

Code Review | Social Media Follow Buttons

WordPress plugin Social Media Follow Buttons scored 10% from 54 tests.

About plugin

  • Plugin page: social-media-foll...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.4.2
  • WordPress version: 5.8.1
  • First release: Apr 30, 2015
  • Latest release: Mar 23, 2016
  • Number of updates: 25
  • Update frequency: every 13.1 days
  • Top authors: ViewVox (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active / 4,492 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/social-media-follow-buttons/includes/social-media-widget.php+6
    Methods with the same name as their class will not be constructors in a future version of PHP; vv_social_media_widget has a deprecated constructor

Server metrics [RAM: ▼1.86MB] [CPU: ▼186.95ms] Passed 4 tests

An overview of server-side resources used by Social Media Follow Buttons
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /1.77 ▼0.958.58 ▼9.61
Dashboard /wp-admin1.79 ▼1.276.46 ▼35.88
Posts /wp-admin/edit.php1.79 ▼1.327.31 ▼41.97
Add New Post /wp-admin/post-new.php1.79 ▼3.656.62 ▼642.86
Media Library /wp-admin/upload.php1.79 ▼1.226.26 ▼27.09
ViewVox Social Media /wp-admin/options-general.php?page=smfbvv-options1.796.55

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 44 new files
Database: no new tables, 1 new option
New WordPress options
widget_vv_social_media_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Social Media Follow Buttons
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,714 ▲11816.64 ▲0.968.99 ▲0.3251.35 ▲4.69
Dashboard /wp-admin3,008 ▲746.58 ▲0.25155.33 ▲5.74109.07 ▼1.97
Posts /wp-admin/edit.php2,774 ▲353.01 ▲0.3161.02 ▼4.5489.19 ▼1.01
Add New Post /wp-admin/post-new.php1,706 ▲20615.36 ▼3.28373.08 ▼20.50104.42 ▼8.64
Media Library /wp-admin/upload.php1,842 ▲355.43 ▲0.38127.61 ▼19.64119.52 ▲1.14
ViewVox Social Media /wp-admin/options-general.php?page=smfbvv-options2,2294.2098.5269.35

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/social-media-follow-buttons/includes/social-media-widget.php+6
    Methods with the same name as their class will not be constructors in a future version of PHP; vv_social_media_widget has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_vv_social_media_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=smfbvv-options
    • > Deprecated in wp-content/plugins/social-media-follow-buttons/includes/social-media-widget.php+6
    Methods with the same name as their class will not be constructors in a future version of PHP; vv_social_media_widget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=smfbvv-options
    • > Deprecated in wp-content/plugins/social-media-follow-buttons/includes/social-media-widget.php+69
    Function create_function() is deprecated
  • 20 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=smfbvv-options
    • > Notice in wp-content/plugins/social-media-follow-buttons/includes/admin-plugin.php+217
    Trying to access array offset on value of type bool

SRP 0% 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 fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/social-media-follow-buttons/social-media-follow-buttons.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-media-follow-buttons/includes/scripts.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-media-follow-buttons/includes/admin-plugin.php:239
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/social-media-follow-buttons/includes/content-output.php:60
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/social-media-follow-buttons/includes/social-media-widget.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: twitter, buttons, follow, media, linkedin...

social-media-follow-buttons/social-media-follow-buttons.php Passed 13 tests

"Social Media Follow Buttons" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
126 characters long description:
Easy plugin to add the main ViewVox Social Media "Follow On" buttons to any page or post or in a sidebar with included widget.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin405 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP815053372
JavaScript2131025
CSS2718

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
30 compressed PNG files occupy 0.04MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/32/twitter.png0.97KB0.95KB▼ 1.81%
includes/images/32/blogger.png0.92KB0.96KB0.00%
includes/images/32/pinterest.png1.37KB1.30KB▼ 4.92%
includes/images/64/youtube.png2.93KB1.58KB▼ 46.19%
includes/images/32/digg.png0.94KB0.88KB▼ 6.33%