68% social-exchange-plugin

Code Review | MoreSharesForYou - WordPress Sharing Community

WordPress plugin MoreSharesForYou - WordPress Sharing Community scored 68% from 53 tests.

About plugin

  • Plugin page: social-exchange-p...
  • Plugin version: 2.9.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.0
  • WordPress version: 5.8.1
  • First release: Aug 26, 2013
  • Latest release: Feb 4, 2015
  • Number of updates: 112
  • Update frequency: every 4.8 days
  • Top authors: Social Exchange (100%)

Code review

53 tests

User reviews

45 reviews

Install metrics

50+ active / 27,961 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.67MB] [CPU: ▼290.95ms] Passed 4 tests

An overview of server-side resources used by MoreSharesForYou - WordPress Sharing Community
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.94 ▲0.2236.87 ▲12.54
Dashboard /wp-admin2.98 ▼0.0823.93 ▼12.80
Posts /wp-admin/edit.php2.98 ▼0.1322.77 ▼21.60
Add New Post /wp-admin/post-new.php2.98 ▼2.4524.81 ▼1,107.11
Media Library /wp-admin/upload.php2.98 ▼0.0322.76 ▼22.29

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 42 new files
Database: no new tables, 2 new options
New WordPress options
sx_active_campaigns
sx_version

Browser metrics Passed 4 tests

A check of browser resources used by MoreSharesForYou - WordPress Sharing Community
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,740 ▲13416.44 ▲0.917.48 ▼2.2748.69 ▼1.73
Dashboard /wp-admin2,989 ▲1366.03 ▲0.25135.30 ▼4.71121.25 ▲13.97
Posts /wp-admin/edit.php2,835 ▲1292.85 ▲0.1668.65 ▼0.5691.89 ▼7.82
Add New Post /wp-admin/post-new.php1,948 ▲9518.65 ▼0.31388.00 ▼1.1139.00 ▼81.40
Media Library /wp-admin/upload.php1,783 ▲114.98 ▼0.03127.01 ▼25.29123.29 ▲6.66

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5211
    get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead.
  • The uninstall procedure has failed, leaving 2 options in the database
    • sx_version
    • sx_active_campaigns

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/social-exchange-plugin/layouts/channel.php
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sx() in wp-content/plugins/social-exchange-plugin/layouts/optin_form_content.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sx() in wp-content/plugins/social-exchange-plugin/layouts/main_page.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/social-exchange-plugin/social-exchange.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-exchange-plugin/inc/render.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sx() in wp-content/plugins/social-exchange-plugin/layouts/optin_form.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/social-exchange-plugin/inc/common.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% 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:
  • Donate link: Please fix this invalid URI: ""
  • Tags: You are using too many tags: 56 tag instead of maximum 10
The official readme.txt is a good inspiration

social-exchange-plugin/social-exchange.php 92% from 13 tests

The entry point to "MoreSharesForYou - WordPress Sharing Community" version 2.9.5 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("social-exchange-plugin.php" instead of "social-exchange.php")

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 detected976 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP86913773
JavaScript43110118
CSS20085

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions33
▷ Named functions33100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

PNG files should be compressed to save space and minimize bandwidth usage
25 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/googleplus_16_black.png0.63KB0.62KB▼ 0.62%
images/play-icon-green-mini.png3.62KB0.38KB▼ 89.47%
images/linkedin_16_black.png0.47KB0.40KB▼ 13.39%
images/MSFY_Favicon20x20.png5.26KB1.20KB▼ 77.28%
images/play-icon-grey.png0.57KB0.56KB▼ 2.39%