78% social-media-sharing

Code Review | Social Media Sharing

WordPress plugin Social Media Sharing scored78%from 54 tests.

About plugin

  • Plugin page: social-media-sharing
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 1, 2013
  • Latest release: Dec 30, 2013
  • Number of updates: 12
  • Update frequency: every 4.9 days
  • Top authors: jesseover (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,598 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Analyzing server-side resources used by Social Media Sharing
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.42 ▼0.0526.62 ▼13.73
Dashboard /wp-admin3.36 ▲0.0161.97 ▲0.53
Posts /wp-admin/edit.php3.48 ▲0.1255.05 ▲5.18
Add New Post /wp-admin/post-new.php5.94 ▲0.0582.47 ▼26.01
Media Library /wp-admin/upload.php3.27 ▲0.0336.94 ▲1.97
Social Media Sharing /wp-admin/options-general.php?page=social_media_sharing_slug3.2333.45

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Social Media Sharing
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,965 ▲19414.78 ▲0.401.81 ▼0.1143.47 ▲4.20
Dashboard /wp-admin2,349 ▲1616.54 ▲1.63130.44 ▲25.4841.19 ▼2.20
Posts /wp-admin/edit.php2,252 ▲1603.33 ▲1.2955.56 ▲12.0934.86 ▼2.55
Add New Post /wp-admin/post-new.php1,672 ▲15822.30 ▲4.80637.55 ▼42.9435.88 ▼15.80
Media Library /wp-admin/upload.php1,394 ▲94.24 ▲0.0988.66 ▼17.3247.26 ▲4.32
Social Media Sharing /wp-admin/options-general.php?page=social_media_sharing_slug1,0023.1338.6223.76

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=social_media_sharing_slug
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=social_media_sharing_slug
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_theme_supports() in wp-content/plugins/social-media-sharing/social-media-sharing.php:45

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

readme.txt 94% 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 your attention:
  • Screenshots: These screenshots do not have images: #2 (Post a link on Facebook or Twitter to your blog, and your blog post or page will automatically provide Facebook or Twitter with the best image and description available.), #3 (Add Featured Images to blog posts or pages to show up when you share the URL on social media.)
You can look at the official readme.txt

social-media-sharing/social-media-sharing.php Passed 13 tests

"Social Media Sharing" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
65 characters long description:
Adds Facebook OpenGraph and Twitter Card support to your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected181 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24628153
JavaScript111428

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.32
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ Public methods555.56%
▷ Protected methods444.44%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin