84% social-share-by-wp-dev-shed

Code Review | Social Share by WP Dev Shed

WordPress plugin Social Share by WP Dev Shed scored84%from 54 tests.

About plugin

  • Plugin page: social-share-by-w...
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-5.2.2
  • WordPress version: 6.3.1
  • First release: Mar 21, 2014
  • Latest release: Sep 4, 2019
  • Number of updates: 32
  • Update frequency: every 62.3 days
  • Top authors: ryscript (68.75%)wpdevshed (34.38%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /10,960 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼10.15ms] Passed 4 tests

An overview of server-side resources used by Social Share by WP Dev Shed
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.39 ▼1.39
Dashboard /wp-admin3.33 ▼0.0248.30 ▼18.17
Posts /wp-admin/edit.php3.38 ▲0.0251.00 ▲2.11
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.06 ▼23.16
Media Library /wp-admin/upload.php3.25 ▲0.0238.47 ▲2.46

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Social Share by WP Dev Shed
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲13713.67 ▼0.656.71 ▲5.0039.70 ▼0.95
Dashboard /wp-admin2,221 ▲184.81 ▼0.06107.55 ▲1.0744.68 ▲2.85
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0141.40 ▲0.4837.98 ▼1.02
Add New Post /wp-admin/post-new.php1,554 ▲1923.34 ▲0.09660.79 ▲31.8952.06 ▼9.14
Media Library /wp-admin/upload.php1,394 ▼64.18 ▼0.1398.32 ▼9.5242.88 ▼0.13

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-share-by-wp-dev-shed/social-share-by-wpdevshed.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (screenshot-1.png displays the Facebook and Twitter share buttons on an article) image not found
Please take inspiration from this readme.txt

social-share-by-wp-dev-shed/social-share-by-wpdevshed.php 92% from 13 tests

Analyzing the main PHP file in "Social Share by WP Dev Shed" version 1.6
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("social-share-by-wp-dev-shed.php" instead of "social-share-by-wpdevshed.php")

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
No dangerous file extensions were detected172 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP12931115
Markdown111034
CSS151017
JavaScript1346

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-fb.png2.43KB0.89KB▼ 63.34%
images/icon-tw.png2.64KB1.14KB▼ 56.89%
screenshot-1.png43.02KB41.42KB▼ 3.71%