99% simplified-social-share

Code Review | Open Social Share

WordPress plugin Open Social Share scored 99% from 54 tests.

About plugin

  • Plugin page: simplified-social...
  • Plugin version: 6.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-5.7.2
  • WordPress version: 5.8.1
  • First release: Jun 22, 2013
  • Latest release: Jun 1, 2021
  • Number of updates: 50
  • Update frequency: every 58.0 days
  • Top authors: loginradius (48%)social9 (38%)loginradius-dev (18%)

Code review

54 tests

User reviews

80 reviews

Install metrics

1,000+ active / 160,325 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.04MB] [CPU: ▼150.60ms] Passed 4 tests

This is a short check of server-side resources used by Open Social Share
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.0424.39 ▼1.36
Dashboard /wp-admin3.10 ▲0.0431.21 ▼6.18
Posts /wp-admin/edit.php3.21 ▲0.1031.35 ▲0.29
Add New Post /wp-admin/post-new.php5.46 ▲0.0271.38 ▼595.15
Media Library /wp-admin/upload.php3.04 ▲0.0422.86 ▲0.68
Activation /wp-admin/admin.php?page=social93.0820.57
Social Sharing /wp-admin/admin.php?page=social9_share3.2122.39

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 55 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Open Social Share
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,754 ▲15217.21 ▲1.579.94 ▲4.77124.14 ▲50.84
Dashboard /wp-admin2,983 ▲917.31 ▲1.18121.25 ▼11.39188.46 ▲15.14
Posts /wp-admin/edit.php2,757 ▲143.53 ▲0.3173.29 ▲10.30138.55 ▲2.17
Add New Post /wp-admin/post-new.php1,654 ▼2,04423.41 ▲5.13320.19 ▼102.70161.88 ▼0.61
Media Library /wp-admin/upload.php1,785 ▲306.49 ▲0.99130.68 ▼17.63203.45 ▲18.46
Activation /wp-admin/admin.php?page=social91,2883.0161.99121.64
Social Sharing /wp-admin/admin.php?page=social9_share2,0544.8578.98118.48

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests Passed 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 Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: There are too many tags (27 tag instead of maximum 10)
  • Screenshots: These screenshots lack descriptions #2, #3, #4, #5 in simplified-social-share/assets to your readme.txt
You can look at the official readme.txt

simplified-social-share/social9_share.php 85% from 13 tests

The principal PHP file in "Open Social Share" v. 6.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 178 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("simplified-social-share.php" instead of "social9_share.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
Success! There were no dangerous files found in this plugin3,107 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
PHP131121931,451
CSS11772923
JavaScript21719381
SVG3114352

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity17.27
▷ Minimum class complexity1.00
▷ Maximum class complexity88.00
Average method complexity3.18
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods82
▷ Static methods2935.37%
▷ Public methods7996.34%
▷ Protected methods00.00%
▷ Private methods33.66%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
3 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
s9-core/assets/images/cloud.png13.85KB7.55KB▼ 45.52%
s9-core/assets/images/dropdown.png14.96KB0.49KB▼ 96.74%
s9-social-sharing/assets/images/cloud.png13.85KB7.55KB▼ 45.52%