46% sharebar

Code Review | Sharebar

WordPress plugin Sharebar scored 46% from 54 tests.

About plugin

  • Plugin page: sharebar
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-5.1
  • WordPress version: 5.9.2
  • First release: Jun 10, 2010
  • Latest release: Mar 6, 2019
  • Number of updates: 63
  • Update frequency: every 50.7 days
  • Top authors: mdolon (84.13%)noahkagan (14.29%)grimmdude (4.76%)

Code review

54 tests

User reviews

26 reviews

Install metrics

2,000+ active / 294,672 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼1.18MB] [CPU: ▼350.69ms] Passed 4 tests

Server-side resources used by Sharebar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0042.29 ▼15.64
Dashboard /wp-admin3.15 ▼0.2619.67 ▼88.24
Posts /wp-admin/edit.php3.15 ▼0.4918.13 ▼33.15
Add New Post /wp-admin/post-new.php3.15 ▼3.8229.98 ▼1,236.72
Media Library /wp-admin/upload.php3.15 ▼0.1515.89 ▼44.63
Sharebar /wp-admin/options-general.php?page=Sharebar3.1518.60

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 40 new files
Database: 1 new table, 12 new options
New tables
wp_sharebar
New WordPress options
sharebar_swidth
sharebar_credit
sharebar_leftoffset
sharebar_rightoffset
sharebar_auto_posts
sharebar_border
sharebar_horizontal
sharebar_twitter_username
sharebar_bg
sharebar_auto_pages
...

Browser metrics Passed 4 tests

A check of browser resources used by Sharebar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,917 ▲17516.76 ▲0.768.55 ▲3.032.94 ▲0.82
Dashboard /wp-admin2,901 ▲436.20 ▲0.06116.37 ▼13.76172.35 ▲5.52
Posts /wp-admin/edit.php2,700 ▲123.39 ▲0.1661.16 ▼22.40135.12 ▼9.86
Add New Post /wp-admin/post-new.php1,707 ▼417.70 ▼3.07413.89 ▼51.24190.70 ▲34.52
Media Library /wp-admin/upload.php1,706 ▲85.60 ▲0.10144.96 ▼3.13267.19 ▲76.92
Sharebar /wp-admin/options-general.php?page=Sharebar1,8256.97173.23236.52

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5600
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie tables detected upon uninstall: 1 table
    • wp_sharebar
  • Zombie WordPress options detected upon uninstall: 12 options
    • sharebar_position
    • sharebar_auto_posts
    • sharebar_auto_pages
    • sharebar_border
    • sharebar_swidth
    • sharebar_minwidth
    • sharebar_rightoffset
    • sharebar_horizontal
    • sharebar_credit
    • sharebar_bg
    • ...

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Sharebar
    • > User deprecated in wp-includes/functions.php+5600
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Sharebar
    • > Notice in wp-content/plugins/sharebar/sharebar-admin.php+22
    Undefined index: id
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Sharebar
    • > Deprecated in wp-content/plugins/sharebar/sharebar.php+249
    Function get_magic_quotes_gpc() is deprecated
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Sharebar
    • > Notice in wp-content/plugins/sharebar/sharebar-admin.php+23
    Undefined index: pos
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Sharebar
    • > Notice in wp-content/plugins/sharebar/sharebar-admin.php+24
    Undefined index: status
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Sharebar
    • > Notice in wp-content/plugins/sharebar/sharebar-admin.php+25
    Undefined index: t
    • > GET request to /wp-admin/options-general.php?page=Sharebar
    • > Notice in wp-content/plugins/sharebar/sharebar-admin.php+26
    Undefined index: do
    • > GET request to /wp-admin/options-general.php?page=Sharebar
    • > Notice in wp-content/plugins/sharebar/sharebar-admin.php+284
    Undefined variable: amsg

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/sharebar/sharebar-admin.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/sharebar/sharebar.php:259

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Sharebar
    • > Network (severe)
    http://buttons.reddit.com/button_info.json?jsonp=buttonEmbed.parseSubmission&url=http%3A%2F%2Fwp.com%2Fwp-admin%2Foptions-general.php%3Fpage%3DSharebar - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (The plugin in action (vertical bar). If page is resized to less than 1000px, a vertical share bar appears under title.), #2 (Main Plugin Page), #3 (Plugin Settings Page), #4 (Edit button page)
  • Tags: You are using too many tags: 13 tag instead of maximum 10
You can look at the official readme.txt

sharebar/sharebar.php Passed 13 tests

The main PHP file in "Sharebar" ver. 1.4.1 adds more information about the plugin and also serves as the entry point for this plugin
117 characters long description:
Adds a dynamic bar with sharing icons (Facebook, Twitter, etc.) that changes based on browser size and page location.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin1,211 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP25946519
JavaScript2814515
CSS200177

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions19
▷ Named functions19100.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
22 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/colorpicker_rgb_g.png1.04KB0.83KB▼ 20.21%
images/custom_rgb_g.png1.04KB0.80KB▼ 23.67%
images/custom_submit.png0.97KB0.99KB0.00%
images/colorpicker_hsb_h.png0.99KB0.77KB▼ 21.94%
images/colorpicker_hsb_s.png1.14KB0.80KB▼ 29.97%