79% sticky-social-media-icons

Code Review | Sticky Social Media Icons

WordPress plugin Sticky Social Media Icons scored 79% from 54 tests.

About plugin

  • Plugin page: sticky-social-med...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3
  • WordPress version: 6.3.1
  • First release: Dec 25, 2020
  • Latest release: Aug 24, 2023
  • Number of updates: 26
  • Update frequency: every 37.4 days
  • Top authors: hardikchavada (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active / 4,221 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.78ms] Passed 4 tests

Analyzing server-side resources used by Sticky Social Media Icons
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0949.81 ▲11.15
Dashboard /wp-admin3.36 ▲0.0647.26 ▼2.27
Posts /wp-admin/edit.php3.48 ▲0.1249.87 ▲1.83
Add New Post /wp-admin/post-new.php5.96 ▲0.0881.75 ▼15.03
Media Library /wp-admin/upload.php3.29 ▲0.0634.87 ▲4.34

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 32 new files
Database: 1 new table, 6 new options
New tables
wp_sticky_sm_icons_tbl
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Sticky Social Media Icons: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,977 ▲24213.94 ▼0.4210.20 ▲8.3746.57 ▲1.35
Dashboard /wp-admin2,222 ▲314.88 ▼0.04109.27 ▲2.0340.37 ▼5.14
Posts /wp-admin/edit.php2,111 ▲252.02 ▲0.0135.90 ▼0.4633.28 ▼2.43
Add New Post /wp-admin/post-new.php1,533 ▼1023.17 ▲5.04634.39 ▲20.9856.10 ▲3.89
Media Library /wp-admin/upload.php1,410 ▲254.25 ▲0.0499.14 ▼26.4342.54 ▼8.57

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/sticky-social-media-icons/admin/partials/sticky-social-media-icons-admin-display.php
    • > /wp-content/plugins/sticky-social-media-icons/public/partials/sticky-social-media-icons-public-display.php
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/sticky-social-media-icons/public/partials/social-icons.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_var() on null in wp-content/plugins/sticky-social-media-icons/public/partials/social-icons.php:7
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/sticky-social-media-icons/admin/partials/insert-links.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_var() on null in wp-content/plugins/sticky-social-media-icons/admin/partials/insert-links.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: social media icons, sticky icons, socialmedia floating icons, floating icons

sticky-social-media-icons/sticky-social-media-icons.php Passed 13 tests

"Sticky Social Media Icons" version 2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

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
No dangerous file extensions were detected565 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP14256556441
CSS52324103
JavaScript2115521

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity1.71
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.19
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
4 PNG files occupy 0.25MB with 0.14MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.PNG132.93KB59.91KB▼ 54.93%
assets/banner-772x250.png70.28KB23.53KB▼ 66.52%
assets/screenshot-1.PNG45.12KB22.03KB▼ 51.18%
assets/icon-128x128.png3.83KB1.64KB▼ 57.16%