93% b-social-share

Code Review | B Social Share - Gutenberg Social Share Block

WordPress plugin B Social Share - Gutenberg Social Share Block scored 93% from 54 tests.

About plugin

  • Plugin page: b-social-share
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Dec 11, 2021
  • Latest release: Mar 9, 2022
  • Number of updates: 11
  • Update frequency: every 8.1 days
  • Top authors: charlescormier (81.82%)abuhayat (27.27%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 436 total downloads

Benchmarks

Plugin footprint Passed 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.03MB] [CPU: ▼292.34ms] Passed 4 tests

Analyzing server-side resources used by B Social Share - Gutenberg Social Share Block
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.0857.92 ▼2.20
Dashboard /wp-admin3.47 ▲0.0632.23 ▼1.29
Posts /wp-admin/edit.php3.70 ▲0.0539.48 ▼1.40
Add New Post /wp-admin/post-new.php6.93 ▼0.0496.87 ▼1,164.47
Media Library /wp-admin/upload.php3.34 ▲0.0553.58 ▲28.60

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for B Social Share - Gutenberg Social Share Block
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,807 ▲6316.44 ▲0.8410.31 ▲3.722.75 ▲0.52
Dashboard /wp-admin2,888 ▲316.15 ▼0.00120.78 ▼11.19171.00 ▲4.04
Posts /wp-admin/edit.php2,688 ▼33.24 ▲0.00100.05 ▲35.17147.73 ▼6.07
Add New Post /wp-admin/post-new.php1,685 ▼3419.81 ▼3.27455.75 ▲58.13175.15 ▼43.31
Media Library /wp-admin/upload.php1,698 ▲65.51 ▼0.03144.91 ▼11.38188.75 ▼47.51

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant BSSB_PLUGIN_VERSION - assumed 'BSSB_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/b-social-share/dist/script.asset.php on line 3
    • > PHP Warning
      Use of undefined constant BSSB_PLUGIN_VERSION - assumed 'BSSB_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/b-social-share/dist/editor.asset.php on line 3

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 87% from 29 tests

readme.txt 88% from 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
These attributes need to be fixed:
  • Requires at least: Version not formatted correctly
  • Screenshots: No descriptions were found for these screenshots #2, #3, #4 in b-social-share/assets to your readme.txt
The official readme.txt might help

b-social-share/plugin.php 85% from 13 tests

The primary PHP file in "B Social Share - Gutenberg Social Share Block" version 1.0.2 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("b-social-share.php" instead of "plugin.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin316 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JSON100138
PHP31415102
JavaScript20273
CSS3043

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity6.00
▷ Minimum class complexity5.00
▷ Maximum class complexity7.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods228.57%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin