84% sticky-social-bar

Code Review | Sticky Social Bar

WordPress plugin Sticky Social Bar scored84%from 54 tests.

About plugin

  • Plugin page: sticky-social-bar
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9.2
  • WordPress version: 6.3.1
  • First release: Jul 14, 2013
  • Latest release: Aug 26, 2014
  • Number of updates: 13
  • Update frequency: every 31.4 days
  • Top authors: eftakhairul (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

200+ active /17,648 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

Server-side resources used by Sticky Social Bar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.99 ▼4.38
Dashboard /wp-admin3.31 ▼0.0350.96 ▼20.79
Posts /wp-admin/edit.php3.36 ▲0.0147.22 ▼2.43
Add New Post /wp-admin/post-new.php5.89 ▲0.0192.96 ▼8.04
Media Library /wp-admin/upload.php3.24 ▲0.0138.78 ▲1.83

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 15 new files
Database: 1 new table, 6 new options
New tables
wp_sticky_social_bar
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Sticky Social Bar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,948 ▲16213.57 ▼0.782.38 ▲0.4557.29 ▲15.61
Dashboard /wp-admin2,239 ▲365.06 ▼0.85107.86 ▼0.6376.58 ▲35.01
Posts /wp-admin/edit.php2,112 ▲92.02 ▲0.0234.36 ▼5.8232.74 ▼4.84
Add New Post /wp-admin/post-new.php1,693 ▲16222.42 ▼0.79702.81 ▲15.0544.10 ▼18.61
Media Library /wp-admin/upload.php1,412 ▲184.13 ▼0.0994.10 ▼16.6576.80 ▲31.61

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/sticky-social-bar/sticky-social-bar-setting-form.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/sticky-social-bar/sticky-social-bar.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/sticky-social-bar/sticky-social-bar-setting-form.php:6

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)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === sticky-social-bar === )
  • Donate link: Please fix this invalid url: ""
You can take inspiration from this readme.txt

sticky-social-bar/sticky-social-bar.php Passed 13 tests

"Sticky Social Bar" version 2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
109 characters long description:
Sticky social bar is a simple container of social media icons, glued to the right side of the browser window.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin239 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP33832232
Markdown1407

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
8 PNG files occupy 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/pinterest.png0.97KB0.88KB▼ 10.03%
images/facebook.png3.19KB0.46KB▼ 85.68%
images/linkedin.png3.30KB0.53KB▼ 83.89%
images/wordpress.png3.85KB1.05KB▼ 72.79%
images/vemo.png3.53KB0.78KB▼ 77.92%