84% social-custom-share

Code Review | Social Custom Share

WordPress plugin Social Custom Share scored84%from 54 tests.

About plugin

  • Plugin page: social-custom-share
  • Plugin version: 1.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Jul 28, 2021
  • Latest release: Jun 12, 2023
  • Number of updates: 7
  • Update frequency: every 97.7 days
  • Top authors: rajkakadiya (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /627 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.11MB] [CPU: ▼9.26ms] Passed 4 tests

An overview of server-side resources used by Social Custom Share
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1141.26 ▲2.56
Dashboard /wp-admin3.43 ▲0.0847.36 ▼16.76
Posts /wp-admin/edit.php3.54 ▲0.1846.94 ▲0.61
Add New Post /wp-admin/post-new.php6.01 ▲0.1280.95 ▼22.72
Media Library /wp-admin/upload.php3.35 ▲0.1239.04 ▲1.83
Social Custom Share /wp-admin/options-general.php?page=gwsscs-social-custom-share3.3230.08

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 42 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
gwsscs_twitter_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
gwsscs_facebook_options
theysaidso_admin_options

Browser metrics Passed 4 tests

Social Custom Share: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.17 ▼0.181.69 ▲0.1544.60 ▲3.67
Dashboard /wp-admin2,201 ▲215.65 ▲0.0297.58 ▲8.9243.20 ▲0.31
Posts /wp-admin/edit.php2,106 ▲62.03 ▲0.0634.36 ▼5.7734.25 ▼2.09
Add New Post /wp-admin/post-new.php1,531 ▼423.76 ▲5.26671.60 ▲16.8866.27 ▼7.91
Media Library /wp-admin/upload.php1,406 ▲64.22 ▼0.0197.18 ▼18.1844.68 ▼2.15
Social Custom Share /wp-admin/options-general.php?page=gwsscs-social-custom-share1,0202.1422.8243.33

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 8 options in the database
    • gwsscs_twitter_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • gwsscs_facebook_options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/social-custom-share/shortcodes.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-custom-share/options.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
5 plugin tags: social share button, facebook share, twitter social button, twitter share, facebook social button

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

"Social Custom Share" version 1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
71 characters long description:
Using this plugin, we can allow user to share any text on social media.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected830 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3959533
CSS2280191
PO File12630106

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity21.00
▷ Minimum class complexity11.00
▷ Maximum class complexity26.00
Average method complexity3.61
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
29 PNG files occupy 3.21MB with 2.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/style_6.png240.37KB130.43KB▼ 45.74%
assets/images/fb_style_5.png78.51KB26.61KB▼ 66.11%
assets/images/style_5.png78.06KB27.11KB▼ 65.27%
assets/images/style_7_design_bg.png150.11KB48.27KB▼ 67.84%
assets/images/fb_style_9.png166.30KB30.04KB▼ 81.94%