83% b-social-share

Code Review | B Social Share block - Share your website/website-page link.

WordPress plugin B Social Share block - Share your website/website-page link. scored83%from 54 tests.

About plugin

  • Plugin page: b-social-share
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 11, 2021
  • Latest release: Oct 3, 2023
  • Number of updates: 24
  • Update frequency: every 27.6 days
  • Top authors: charlescormier (87.5%)abuhayat (16.67%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /5,291 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

A check of server-side resources used by B Social Share block - Share your website/website-page link.
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.28 ▼2.28
Dashboard /wp-admin3.34 ▼0.0053.82 ▼12.89
Posts /wp-admin/edit.php3.39 ▲0.0451.45 ▼0.68
Add New Post /wp-admin/post-new.php5.93 ▲0.0497.04 ▼12.82
Media Library /wp-admin/upload.php3.27 ▲0.0438.31 ▲0.32

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by B Social Share block - Share your website/website-page link.
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲6613.65 ▼0.6315.05 ▲13.4342.93 ▲1.12
Dashboard /wp-admin2,198 ▲245.64 ▲0.0785.26 ▼5.6842.89 ▼5.31
Posts /wp-admin/edit.php2,103 ▼01.98 ▼0.0241.71 ▲3.2136.90 ▲0.64
Add New Post /wp-admin/post-new.php6,205 ▲4,67919.28 ▼3.92875.92 ▲198.7036.89 ▼10.43
Media Library /wp-admin/upload.php1,397 ▼34.17 ▼0.05101.86 ▼1.5342.67 ▼0.50

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > 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
    • > 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

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 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
Attributes that require attention:
  • Requires at least: Version format is invalid
  • Screenshots: These screenshots lack descriptions #2, #3, #4 in b-social-share/assets to your readme.txt
Please take inspiration from this readme.txt

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

The main file in "B Social Share block - Share your website/website-page link." v. 1.0.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("b-social-share.php" instead of "plugin.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin414 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PO File165131143
JSON200139
JavaScript30374
PHP4131555
CSS3063

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin