83% wp-social-share-buttons

Code Review | WordPress Social Share Buttons

WordPress plugin WordPress Social Share Buttons scored83%from 54 tests.

About plugin

  • Plugin page: wp-social-share-b...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 10, 2016
  • Latest release: Sep 19, 2017
  • Number of updates: 15
  • Update frequency: every 33.1 days
  • Top authors: mag_oberon (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active /4,756 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.25ms] Passed 4 tests

A check of server-side resources used by WordPress Social Share Buttons
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.46 ▲4.24
Dashboard /wp-admin3.32 ▼0.0344.78 ▼15.13
Posts /wp-admin/edit.php3.37 ▲0.0144.19 ▼0.68
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.01 ▼0.74
Media Library /wp-admin/upload.php3.24 ▲0.0134.93 ▲3.57

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WordPress Social Share Buttons
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.41 ▲0.041.77 ▲0.1744.72 ▲4.17
Dashboard /wp-admin2,198 ▲185.68 ▲0.0286.16 ▼15.2334.24 ▼6.33
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0039.64 ▲3.6636.41 ▲1.95
Add New Post /wp-admin/post-new.php1,528 ▼323.14 ▼0.12598.26 ▼23.5350.05 ▼4.70
Media Library /wp-admin/upload.php1,403 ▲94.24 ▲0.0797.54 ▼1.0343.70 ▲2.06

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× 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/wp-social-share-buttons/wp-social-share-buttons.php:59

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% 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:
  • Screenshots: Please add an image for screenshot #1 (demo)
  • Requires at least: Invalid plugin version format
  • Tags: Too many tags (24 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

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

The main PHP file in "WordPress Social Share Buttons" ver. 1.4 adds more information about the plugin and also serves as the entry point for this plugin
123 characters long description:
WordPress Social Share Buttons - Facebook Share, Tweet, Google+, Buffer, LinkedIn, StumbleUpon, Pin it Buttons after posts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin84 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1112884

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
demo.png28.82KB15.81KB▼ 45.13%