79% simple-social-share-block

Code Review | Simple Social Share Block

WordPress plugin Simple Social Share Block scored 79% from 54 tests.

About plugin

  • Plugin page: simple-social-sha...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.7-6.1
  • WordPress version: 6.3.1
  • First release: Aug 1, 2018
  • Latest release: Apr 20, 2023
  • Number of updates: 22
  • Update frequency: every 78.3 days
  • Top authors: leroysabrina (54.55%)bastho (50%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,001 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.24MB] [CPU: ▼43.13ms] Passed 4 tests

Server-side resources used by Simple Social Share Block
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.73 ▼0.7314.37 ▼27.94
Dashboard /wp-admin2.77 ▼0.5415.74 ▼34.18
Posts /wp-admin/edit.php2.77 ▼0.5915.62 ▼33.27
Add New Post /wp-admin/post-new.php2.77 ▼3.1216.70 ▼77.13
Media Library /wp-admin/upload.php2.77 ▼0.4614.82 ▼18.92

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Social Share Block
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.21 ▼1.181.76 ▼0.0041.23 ▲0.20
Dashboard /wp-admin2,209 ▲204.80 ▼0.17108.63 ▼2.3642.03 ▲0.81
Posts /wp-admin/edit.php2,089 ▼32.01 ▼0.0540.24 ▲0.3435.91 ▲0.64
Add New Post /wp-admin/post-new.php1,528 ▲623.39 ▼0.30585.48 ▼0.9551.23 ▼3.48
Media Library /wp-admin/upload.php1,391 ▲64.21 ▼0.0193.65 ▼2.8841.65 ▼0.94

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/simple-social-share-block/sssb.php+36
    filemtime(): stat failed for wp-content/plugins/simple-social-share-block//build/social-sharing/index.js
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === simple-social-share-block === )
  • Screenshots: Add images for these screenshots: #1 (Images + Grayscale), #2 (Icons + Colour), #3 (Icons + Colour + No Print button)
Please take inspiration from this readme.txt

simple-social-share-block/sssb.php 85% from 13 tests

This is the main PHP file of "Simple Social Share Block" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simple-social-share-block.php" instead of "sssb.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin18,114 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JSON30016,290
JavaScript711150857
SVG100348
Sass260294
PHP13852147
CSS3211100
PO File1202678

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
8 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-pdf.png0.84KB0.45KB▼ 46.17%
assets/screenshot-2.png2.67KB1.44KB▼ 46.21%
assets/icon-256x256.png4.81KB2.16KB▼ 55.11%
assets/screenshot-3.png2.27KB1.55KB▼ 31.70%
assets/screenshot-1.png4.07KB2.15KB▼ 47.12%