83% g-social-buttons

Code Review | G Social Buttons

WordPress plugin G Social Buttons scored83%from 54 tests.

About plugin

  • Plugin page: g-social-buttons
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2.2
  • WordPress version: 6.3.1
  • First release: Jun 26, 2019
  • Latest release: Jun 26, 2019
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: sinanyorulmaz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /517 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼8.29ms] Passed 4 tests

An overview of server-side resources used by G Social Buttons
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.89 ▲1.41
Dashboard /wp-admin3.34 ▼0.0043.42 ▼19.34
Posts /wp-admin/edit.php3.39 ▲0.0443.85 ▼0.96
Add New Post /wp-admin/post-new.php5.94 ▲0.0579.39 ▼13.19
Media Library /wp-admin/upload.php3.28 ▲0.0632.32 ▲0.33

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 34 new files
Database: no new tables, 39 new options
New WordPress options
call_now_link
widget_recent-posts
skype_link
skype_text
db_upgraded
call_now_social_data
widget_theysaidso_widget
twitter_text
pinterest_text
phone_link
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for G Social Buttons
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲8914.36 ▼0.202.01 ▲0.2251.95 ▲8.70
Dashboard /wp-admin2,211 ▲315.57 ▼0.0484.16 ▼14.7938.59 ▼2.89
Posts /wp-admin/edit.php2,116 ▲132.00 ▲0.0333.48 ▼4.9935.01 ▼1.43
Add New Post /wp-admin/post-new.php6,255 ▲4,72719.14 ▼3.93822.82 ▲169.9052.18 ▼0.68
Media Library /wp-admin/upload.php1,416 ▲164.18 ▲0.0195.03 ▼1.2441.32 ▼0.32

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 39 options in the database
    • mail_link
    • whatsapp_link
    • skype_text
    • instagram_link
    • call_now_title
    • widget_theysaidso_widget
    • linkedin_text
    • phone_text
    • skype_link
    • phone_link
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/g-social-buttons/gsb-functions.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/g-social-buttons/includes/gsb.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/g-social-buttons/gsb-admin.php:73
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/g-social-buttons/gsb-functions.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (An image from the setting panel of the "G Social Buttons" plug-in.)
The official readme.txt might help

g-social-buttons/index.php 85% from 13 tests

The entry point to "G Social Buttons" version 1.0.2 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 180 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("g-social-buttons.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin32,053 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
SVG401630,149
PHP51966571,255
Sass21140646
CSS3063

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity134.00
▷ Minimum class complexity134.00
▷ Maximum class complexity134.00
Average method complexity4.69
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods36
▷ Static methods925.00%
▷ Public methods3391.67%
▷ Protected methods25.56%
▷ Private methods12.78%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants00.00%
▷ Class constants9100.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin