10% 3xsocializer

Code Review | 3xSocializer

WordPress plugin 3xSocializer scored 10% from 54 tests.

About plugin

  • Plugin page: 3xsocializer
  • Plugin version: 0.98.22
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.2-3.4.2
  • WordPress version: 5.9.2
  • First release: Sep 21, 2012
  • Latest release: Sep 25, 2012
  • Number of updates: 9
  • Update frequency: every 1.0 days
  • Top authors: cturnbull (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,385 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/3xsocializer/3xsocializer.php+30
    Methods with the same name as their class will not be constructors in a future version of PHP; TXSocial has a deprecated constructor

Server metrics [RAM: ▼0.02MB] [CPU: ▼306.45ms] Passed 4 tests

A check of server-side resources used by 3xSocializer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0153.49 ▲2.12
Dashboard /wp-admin3.41 ▲0.0033.68 ▼1.55
Posts /wp-admin/edit.php3.65 ▲0.0035.94 ▼1.24
Add New Post /wp-admin/post-new.php6.88 ▼0.0991.41 ▼1,223.58
Media Library /wp-admin/upload.php3.30 ▲0.0023.70 ▲0.59

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 53 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for 3xSocializer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,805 ▲4616.22 ▲0.216.26 ▲0.212.59 ▼0.28
Dashboard /wp-admin2,895 ▲346.06 ▼0.15117.30 ▼16.23155.97 ▼3.04
Posts /wp-admin/edit.php2,688 ▲33.24 ▲0.0065.19 ▲2.25153.07 ▲3.77
Add New Post /wp-admin/post-new.php1,719 ▲5821.69 ▲4.44408.67 ▼2.06156.32 ▼1.68
Media Library /wp-admin/upload.php1,692 ▼95.53 ▲0.01151.89 ▲13.47187.33 ▲5.69

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/3xsocializer/3xsocializer.php+30
    Methods with the same name as their class will not be constructors in a future version of PHP; TXSocial has a deprecated constructor

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 9× PHP files output text when accessed directly:
    • > /wp-content/plugins/3xsocializer/upload-image.php
    • > /wp-content/plugins/3xsocializer/help/twitter.php
    • > /wp-content/plugins/3xsocializer/plugin_info.php
    • > /wp-content/plugins/3xsocializer/3xsocializer.php
    • > /wp-content/plugins/3xsocializer/help/linkedin.php
    • > /wp-content/plugins/3xsocializer/help/screenr.php
    • > /wp-content/plugins/3xsocializer/api.php
    • > /wp-content/plugins/3xsocializer/help/youtube.php
    • > /wp-content/plugins/3xsocializer/help/facebook.php
  • 15× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook' not found in wp-content/plugins/3xsocializer/facebook-php-sdk/examples/example.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/3xsocializer/after_post.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook' not found in wp-content/plugins/3xsocializer/facebook-php-sdk/examples/with_js_sdk.php:5
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/3xsocializer/account_sets.php:5
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/3xsocializer/social_posts_share.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/3xsocializer/facebook-php-sdk/tests/tests.php:18
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/3xsocializer/settings.php on line 425
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/3xsocializer/social_posts.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/3xsocializer/license.php:36
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/3xsocializer/account_sets.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: social network, 3xsocial, 3xsocializer, don crowther, social...

3xsocializer/3xsocializer.php Passed 13 tests

Analyzing the main PHP file in "3xSocializer" version 0.98.22
22 characters long description:
Social Sharing Utility

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Almost there! Just fix the following issues
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/3xsocializer/facebook-php-sdk/src/fb_ca_chain_bundle.crt
6,856 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP279601,4426,266
JavaScript21110283
CSS1716199
Markdown233081
JSON10022
YAML1005

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity13.22
▷ Minimum class complexity1.00
▷ Maximum class complexity168.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes40
▷ Abstract classes512.50%
▷ Concrete classes3587.50%
▷ Final classes00.00%
Methods390
▷ Static methods297.44%
▷ Public methods31480.51%
▷ Protected methods5814.87%
▷ Private methods184.62%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants847.06%
▷ Class constants952.94%
▷ Public constants9100.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
14 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/edit_icon.png0.92KB1.03KB0.00%
images/facebook_logo.png3.60KB2.50KB▼ 30.46%
images/checkbox.png0.39KB0.24KB▼ 38.15%
images/save_icon.png1.20KB1.20KB0.00%
images/twitter_logo.png5.65KB2.95KB▼ 47.71%