89% social-share-buttons-widget-and-shortcode

Code Review | Social Share Buttons - Widget and Shortcode

WordPress plugin Social Share Buttons - Widget and Shortcode scored89%from 54 tests.

About plugin

  • Plugin page: social-share-butt...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.2.4
  • WordPress version: 6.3.1
  • First release: Dec 13, 2019
  • Latest release: Dec 13, 2019
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: getseofix (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /466 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.32ms] Passed 4 tests

An overview of server-side resources used by Social Share Buttons - Widget and Shortcode
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.62 ▼7.69
Dashboard /wp-admin3.35 ▲0.0548.91 ▼0.54
Posts /wp-admin/edit.php3.40 ▲0.0451.36 ▼2.60
Add New Post /wp-admin/post-new.php5.93 ▲0.0486.34 ▼6.43
Media Library /wp-admin/upload.php3.27 ▲0.0442.46 ▲6.37

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 10 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_social_share
widget_theysaidso_widget
can_compress_scripts
Social_ShareInputField2
Social_ShareInputField1
widget_recent-posts
Social_ShareInputField3

Browser metrics Passed 4 tests

This is an overview of browser requirements for Social Share Buttons - Widget and Shortcode
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.53 ▼0.211.73 ▼0.1844.48 ▼1.03
Dashboard /wp-admin2,210 ▲305.56 ▼0.0995.77 ▲5.4579.87 ▲35.13
Posts /wp-admin/edit.php2,097 ▼61.99 ▲0.0336.38 ▼4.7636.03 ▼3.13
Add New Post /wp-admin/post-new.php1,553 ▲2723.17 ▲0.05685.57 ▲27.65114.03 ▲54.23
Media Library /wp-admin/upload.php1,415 ▲154.23 ▼0.01100.78 ▼3.6460.30 ▲15.07

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 10 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • Social_ShareInputField3
    • Social_ShareInputField1
    • widget_social_share
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • Social_ShareInputField2

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: twitter, social media, facebook, social buttons, social share

social-share-buttons-widget-and-shortcode/SocialButtons-GSF.php 92% from 13 tests

The primary PHP file in "Social Share Buttons - Widget and Shortcode" version 1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("social-share-buttons-widget-and-shortcode.php" instead of "SocialButtons-GSF.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin252 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP35342252

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods216.67%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
9 PNG files occupy 0.73MB with 0.50MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
fb.png2.29KB0.25KB▼ 89.23%
screenicon.png6.08KB3.15KB▼ 48.15%
screenshot-1.png479.65KB149.93KB▼ 68.74%
screenshot-2.png62.37KB21.59KB▼ 65.38%
promo.png32.61KB10.14KB▼ 68.91%