73% socialsnap

Code Review | Social Share Buttons, Social Sharing Icons, Click to Tweet — Social Media Plugin by Social Snap

WordPress plugin Social Share Buttons, Social Sharing Icons, Click to Tweet — Social Media Plugin by Social Snap scored 73% from 54 tests.

About plugin

  • Plugin page: socialsnap
  • Plugin version: 1.3.4
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: May 5, 2018
  • Latest release: Sep 20, 2023
  • Number of updates: 76
  • Update frequency: every 27.0 days
  • Top authors: socialsnap (100%)

Code review

54 tests

User reviews

55 reviews

Install metrics

10,000+ active / 479,453 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.29MB] [CPU: ▲4.46ms] 75% from 4 tests

Server-side resources used by Social Share Buttons, Social Sharing Icons, Click to Tweet — Social Media Plugin by Social Snap
The following require your attention
  • CPU: You should keep total CPU usage under 500.00ms (currently 1,121.00ms on /wp-admin/admin.php?page=socialsnap-addons)
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2153.27 ▲7.14
Dashboard /wp-admin3.64 ▲0.3360.59 ▲9.13
Posts /wp-admin/edit.php3.69 ▲0.3465.15 ▲3.20
Add New Post /wp-admin/post-new.php6.32 ▲0.43126.06 ▼1.64
Media Library /wp-admin/upload.php3.50 ▲0.2747.41 ▲10.60
About /wp-admin/admin.php?page=about-socialsnap3.5341.68
Settings /wp-admin/admin.php?page=socialsnap-settings3.94105.15
Statistics /wp-admin/admin.php?page=socialsnap-statistics3.5641.01
Addons /wp-admin/admin.php?page=socialsnap-addons3.561,121.00

Server storage [IO: ▲1.43MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 79 new files
Database: 1 new table, 11 new options
New tables
wp_socialsnap_stats
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
socialsnap_activated
widget_socialsnap-ctt-widget
widget_recent-comments
db_upgraded
socialsnap_settings
socialsnap_version
widget_socialsnap-social-followers-widget
...

Browser metrics Passed 4 tests

An overview of browser requirements for Social Share Buttons, Social Sharing Icons, Click to Tweet — Social Media Plugin by Social Snap
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,228 ▲43914.07 ▲0.878.25 ▲6.3949.23 ▲6.79
Dashboard /wp-admin2,261 ▲555.03 ▼0.87105.42 ▲4.0639.46 ▲0.07
Posts /wp-admin/edit.php2,188 ▲962.05 ▲0.0241.09 ▲0.4438.26 ▲2.65
Add New Post /wp-admin/post-new.php7,378 ▲5,84920.59 ▲2.291,177.18 ▲512.2768.02 ▲1.18
Media Library /wp-admin/upload.php1,438 ▲534.23 ▼0.0194.51 ▼6.7539.31 ▼5.81
About /wp-admin/admin.php?page=about-socialsnap1,3162.0533.7276.41
Settings /wp-admin/admin.php?page=socialsnap-settings6,5553.91159.62119.59
Statistics /wp-admin/admin.php?page=socialsnap-statistics9012.0631.1539.21
Addons /wp-admin/admin.php?page=socialsnap-addons9892.2029.6136.51

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_socialsnap_stats
  • This plugin did not uninstall successfully, leaving 11 options in the database
    • socialsnap_settings
    • socialsnap_activated
    • widget_recent-posts
    • theysaidso_admin_options
    • socialsnap_version
    • widget_socialsnap-social-followers-widget
    • widget_theysaidso_widget
    • db_upgraded
    • widget_socialsnap-ctt-widget
    • can_compress_scripts
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 25× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/socialsnap/includes/admin/class-rating.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/socialsnap/includes/admin/settings/config-editor.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/socialsnap/includes/class-install.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/socialsnap/includes/share/class-social-share.php:98
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/socialsnap/includes/class-click-to-tweet.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/socialsnap/includes/compatibility/class-mashshare-compatibility.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/socialsnap/includes/compatibility/class-sw-compatibility.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/socialsnap/includes/admin/class-post-list-table.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'SocialSnap_DB' not found in wp-content/plugins/socialsnap/includes/class-db-stats.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/socialsnap/includes/functions.php:413

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 87% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Tags: Too many tags (36 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Please a description for screenshot #18 in socialsnap/assets to your readme.txt
The official readme.txt might help

socialsnap/socialsnap.php 85% from 13 tests

The main file in "Social Share Buttons, Social Sharing Icons, Click to Tweet — Social Media Plugin by Social Snap" v. 1.3.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages")

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 plugin11,342 lines of code in 71 files:
LanguageFilesBlank linesComment linesLines of code
PHP562,6173,0669,753
PO File17217441,525
XML10051
JavaScript6006
CSS5005
SVG2002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity26.60
▷ Minimum class complexity2.00
▷ Maximum class complexity219.00
Average method complexity6.18
▷ Minimum method complexity1.00
▷ Maximum method complexity69.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes50
▷ Abstract classes12.00%
▷ Concrete classes4998.00%
▷ Final classes12.04%
Methods247
▷ Static methods62.43%
▷ Public methods23093.12%
▷ Protected methods31.21%
▷ Private methods145.67%
Functions67
▷ Named functions6698.51%
▷ Anonymous functions11.49%
Constants8
▷ Global constants8100.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