84% zedna-social-share-floating-buttons

Code Review | Zedna Social Share Floating Buttons

WordPress plugin Zedna Social Share Floating Buttons scored 84% from 54 tests.

About plugin

  • Plugin page: zedna-social-shar...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.4
  • WordPress version: 6.3.1
  • First release: Jan 18, 2017
  • Latest release: Mar 12, 2020
  • Number of updates: 6
  • Update frequency: every 190.8 days
  • Top authors: zedna (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 993 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Zedna Social Share Floating Buttons
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.15 ▼0.10
Dashboard /wp-admin3.32 ▲0.0247.30 ▼2.13
Posts /wp-admin/edit.php3.37 ▲0.0242.37 ▼10.71
Add New Post /wp-admin/post-new.php5.90 ▲0.0284.22 ▼14.63
Media Library /wp-admin/upload.php3.24 ▲0.0260.15 ▲25.03

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 103 new files
Database: no new tables, 13 new options
New WordPress options
zedna_social_share_buttons_show_linkedin
zedna_social_share_buttons_show_twitter
db_upgraded
zedna_social_share_buttons_position
zedna_social_share_buttons_show_rss
zedna_social_share_buttons_width
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
...

Browser metrics Passed 4 tests

An overview of browser requirements for Zedna Social Share Floating Buttons
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,857 ▲10013.58 ▼0.781.87 ▼0.1042.10 ▲2.02
Dashboard /wp-admin2,224 ▲334.92 ▲0.05109.06 ▲5.7086.22 ▲39.57
Posts /wp-admin/edit.php2,104 ▲121.97 ▼0.1336.28 ▼8.2732.97 ▼3.06
Add New Post /wp-admin/post-new.php1,680 ▲14521.90 ▼1.10754.59 ▲117.6157.68 ▼3.29
Media Library /wp-admin/upload.php1,394 ▲64.14 ▼0.0396.26 ▼1.2976.33 ▲33.15

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
  • This plugin does not fully uninstall, leaving 13 options in the database
    • zedna_social_share_buttons_width
    • zedna_social_share_buttons_show_googleplus
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • zedna_social_share_buttons_show_linkedin
    • zedna_social_share_buttons_show_facebook
    • widget_recent-comments
    • widget_theysaidso_widget
    • zedna_social_share_buttons_position
    • ...

Smoke tests 75% 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)
Good news, no errors were detected

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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/zedna-social-share-floating-buttons/zedna-social-share-buttons-widget.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_option() in wp-content/plugins/zedna-social-share-floating-buttons/zedna-social-share-buttons.php:15

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: icons, share, button, social, floating

zedna-social-share-floating-buttons/zedna-social-share-buttons.php 92% from 13 tests

The main PHP script in "Zedna Social Share Floating Buttons" version 1.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("zedna-social-share-floating-buttons.php" instead of "zedna-social-share-buttons.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected186 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22925186

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions5
▷ Named functions5100.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
100 PNG files occupy 0.21MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
social-icons/128-instagram.png0.84KB0.89KB0.00%
social-icons/64-dropbox.png0.82KB0.86KB0.00%
social-icons/16-digg.png1.04KB0.10KB▼ 90.00%
social-icons/128-yahoo.png0.79KB0.85KB0.00%
social-icons/16-dropbox.png1.25KB0.32KB▼ 74.22%