84% basic-social-share-buttons

Code Review | Basic Social Share Buttons

WordPress plugin Basic Social Share Buttons scored84%from 54 tests.

About plugin

  • Plugin page: basic-social-shar...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 11, 2021
  • Latest release: Sep 17, 2023
  • Number of updates: 6
  • Update frequency: every 143.7 days
  • Top authors: basicbydesign (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,039 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
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.73ms] Passed 4 tests

Server-side resources used by Basic Social Share Buttons
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.59 ▼1.38
Dashboard /wp-admin3.32 ▼0.0344.57 ▼21.73
Posts /wp-admin/edit.php3.37 ▲0.0148.19 ▲4.45
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.12 ▼18.57
Media Library /wp-admin/upload.php3.24 ▲0.0133.85 ▲2.77

Server storage [IO: ▲0.24MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Basic Social Share Buttons: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.21 ▼1.171.59 ▼0.2141.53 ▼1.40
Dashboard /wp-admin2,206 ▲215.90 ▲0.95104.60 ▼4.8342.21 ▼2.54
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.0138.01 ▲1.1836.88 ▲0.29
Add New Post /wp-admin/post-new.php1,536 ▲1423.57 ▲0.33589.74 ▼62.3846.10 ▼4.48
Media Library /wp-admin/upload.php1,388 ▲34.20 ▲0.0194.19 ▼4.8240.91 ▼0.96

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

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 | 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
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'BBD_Basic_Share_Buttons' not found in wp-content/plugins/basic-social-share-buttons/classes/bsb-admin.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/basic-social-share-buttons/basic-share-buttons.php:54
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/basic-social-share-buttons/classes/bsb-settings.php:5

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 93% 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
These attributes need to be fixed:
  • Requires at least: Invalid version format
The official readme.txt might help

basic-social-share-buttons/basic-share-buttons.php 92% from 13 tests

The primary PHP file in "Basic Social Share Buttons" version 1.0.2 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("basic-social-share-buttons.php" instead of "basic-share-buttons.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
Everything looks great! No dangerous files found in this plugin608 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP47518324
CSS2361175
JavaScript220669
Markdown124040

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity5.00
▷ Minimum class complexity2.00
▷ Maximum class complexity6.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1173.33%
▷ Protected methods00.00%
▷ Private methods426.67%
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
5 PNG files occupy 0.17MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png35.02KB11.83KB▼ 66.22%
assets/screenshot-3.png27.10KB9.52KB▼ 64.88%
assets/screenshot-4.png54.65KB16.82KB▼ 69.23%
assets/screenshot-1.png44.75KB14.79KB▼ 66.95%
assets/screenshot-5.png16.72KB6.69KB▼ 59.97%