94% sticky-social-icon

Code Review | Sticky Social Icon

WordPress plugin Sticky Social Icon scored 94% from 54 tests.

About plugin

  • Plugin page: sticky-social-icon
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4.0
  • WordPress version: 5.8.1
  • First release: Dec 26, 2013
  • Latest release: Dec 22, 2015
  • Number of updates: 20
  • Update frequency: every 36.4 days
  • Top authors: nkuldip (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active / 8,047 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼144.36ms] Passed 4 tests

Analyzing server-side resources used by Sticky Social Icon
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0226.51 ▼1.30
Dashboard /wp-admin3.09 ▲0.0246.45 ▲3.66
Posts /wp-admin/edit.php3.14 ▲0.0239.31 ▲3.04
Add New Post /wp-admin/post-new.php5.45 ▲0.0075.14 ▼577.96
Media Library /wp-admin/upload.php3.03 ▲0.0224.90 ▼1.22

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 22 new files
Database: 1 new table, no new options
New tables
wp_sticky_social_icon

Browser metrics Passed 4 tests

An overview of browser requirements for Sticky Social Icon
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,923 ▲32216.17 ▲0.146.50 ▲0.3078.66 ▲2.90
Dashboard /wp-admin2,962 ▲666.90 ▲0.73117.40 ▼13.45181.79 ▲8.90
Posts /wp-admin/edit.php2,776 ▲703.28 ▲0.0567.44 ▲0.37133.94 ▼15.28
Add New Post /wp-admin/post-new.php2,338 ▼1,40515.70 ▼3.52438.29 ▼0.64180.55 ▲15.31
Media Library /wp-admin/upload.php1,779 ▲275.87 ▲0.42127.82 ▼27.89205.77 ▲21.93

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

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 no errors were found, this is by no means 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
Please fix the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/sticky-social-icon/sticky-social-icon.php:15
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/sticky-social-icon/sticky-social-icon-setting-form.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/sticky-social-icon/sticky-social-icon-setting-form.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (Setting Page with color theme), #2 (Real UI with color picker)
The official readme.txt might help

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

The main PHP script in "Sticky Social Icon" version 2.0.0 is automatically included on every request by WordPress
110 characters long description:
Sticky social icon 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 file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin363 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP34334336
JavaScript10327

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.42
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%
Functions7
▷ Named functions7100.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
17 PNG files occupy 0.10MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icon/facebook.png3.19KB0.46KB▼ 85.68%
icon/instagram.png3.56KB0.68KB▼ 81.03%
icon/flickr.png3.29KB0.57KB▼ 82.71%
icon/tumblr.png3.25KB0.46KB▼ 85.99%
icon/vemo.png3.53KB0.78KB▼ 77.92%