90% social-share-block

Code Review | Social Share Block

WordPress plugin Social Share Block scored90%from 54 tests.

About plugin

  • Plugin page: social-share-block
  • Plugin version: 2.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Aug 27, 2020
  • Latest release: Apr 3, 2023
  • Number of updates: 7
  • Update frequency: every 135.6 days
  • Top authors: wpdevteam (71.43%)alam789 (42.86%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,305 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Social Share Block
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0640.72 ▲2.20
Dashboard /wp-admin3.33 ▼0.0245.81 ▼16.97
Posts /wp-admin/edit.php3.45 ▲0.0944.30 ▼0.39
Add New Post /wp-admin/post-new.php5.94 ▲0.0579.38 ▼15.38
Media Library /wp-admin/upload.php3.25 ▲0.0238.11 ▲5.65

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 53 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Social Share Block
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲7114.27 ▼0.091.86 ▲0.2545.91 ▲2.03
Dashboard /wp-admin2,200 ▲195.57 ▼0.16101.34 ▼10.0941.96 ▼7.91
Posts /wp-admin/edit.php2,105 ▲52.03 ▲0.0135.59 ▼1.3134.24 ▲0.17
Add New Post /wp-admin/post-new.php1,674 ▲14621.94 ▼1.14654.31 ▼33.9637.17 ▼16.50
Media Library /wp-admin/upload.php1,463 ▲664.25 ▼0.0199.02 ▼1.4444.28 ▲1.78

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
You can take inspiration from this readme.txt

social-share-block/social-share-block.php Passed 13 tests

The main PHP script in "Social Share Block" version 2.0.2 is automatically included on every request by WordPress
94 characters long description:
Share your posts & pages instantly on popular social platforms in one click from your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin23,351 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
SVG50012,231
CSS71,5035410,223
PHP10113180792
JavaScript715891
JSON20014

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity35.00
▷ Minimum class complexity1.00
▷ Maximum class complexity87.00
Average method complexity5.71
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods34
▷ Static methods1338.24%
▷ Public methods3088.24%
▷ Protected methods00.00%
▷ Private methods411.76%
Functions5
▷ Named functions240.00%
▷ Anonymous functions360.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin