79% fny-social-media-share-buttons

Code Review | Social Media Share Buttons

WordPress plugin Social Media Share Buttons scored79%from 54 tests.

About plugin

  • Plugin page: fny-social-media-...
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.8
  • WordPress version: 6.3.1
  • First release: Dec 30, 2016
  • Latest release: Jun 13, 2018
  • Number of updates: 101
  • Update frequency: every 5.7 days
  • Top authors: fnywebit (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

90+ active /6,570 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.93ms] Passed 4 tests

An overview of server-side resources used by Social Media Share Buttons
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.75 ▲1.60
Dashboard /wp-admin3.32 ▲0.0248.08 ▼1.10
Posts /wp-admin/edit.php3.37 ▲0.0150.77 ▲4.12
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.45 ▼7.99
Media Library /wp-admin/upload.php3.24 ▲0.0136.99 ▼0.23
All Share Buttons /wp-admin/admin.php?page=fny_share_buttons_admin3.2533.67
Add New /wp-admin/admin.php?page=fny_create_share_button3.2530.42
Products /wp-admin/admin.php?page=fny_smsb_other_products3.2430.25

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Social Media Share Buttons
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9614.44 ▲0.321.52 ▼0.3741.93 ▼3.88
Dashboard /wp-admin2,234 ▲435.78 ▼0.0899.14 ▼10.7939.52 ▼0.95
Posts /wp-admin/edit.php2,120 ▲342.02 ▼0.0240.23 ▲3.4734.62 ▲1.84
Add New Post /wp-admin/post-new.php1,567 ▲5318.60 ▲1.11597.87 ▼111.1451.43 ▼7.58
Media Library /wp-admin/upload.php1,419 ▲344.24 ▼0.06100.71 ▼2.1339.54 ▼6.05
All Share Buttons /wp-admin/admin.php?page=fny_share_buttons_admin9072.0326.3959.95
Add New /wp-admin/admin.php?page=fny_create_share_button2,2722.2931.2735.44
Products /wp-admin/admin.php?page=fny_smsb_other_products8952.0226.4931.32

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_fny_sharebuttons
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
You can look at the official readme.txt

fny-social-media-share-buttons/fnysocialmediasharebuttons.php 92% from 13 tests

Analyzing the main PHP file in "Social Media Share Buttons" version 1.7
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("fny-social-media-share-buttons.php" instead of "fnysocialmediasharebuttons.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
No dangerous file extensions were detected27,296 lines of code in 112 files:
LanguageFilesBlank linesComment linesLines of code
CSS11696413,761
SVG420405,651
Sass1845373,364
LESS1845613,340
PHP1313827548
HTML191282
JavaScript66710267
Markdown111051
JSON20032

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity6.50
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods562.50%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants14100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.18MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/bootstrap/assets/img/bootstrap-social.png51.39KB13.26KB▼ 74.19%
public/images/backup.png76.62KB25.31KB▼ 66.96%
public/images/gallery.png19.85KB8.35KB▼ 57.96%
public/images/pro.PNG12.28KB5.33KB▼ 56.61%
public/images/pro_size.PNG4.35KB2.22KB▼ 48.89%