10% socialplus

Code Review | SocialPlus

WordPress plugin SocialPlus scored10%from 54 tests.

About plugin

  • Plugin page: socialplus
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.1
  • WordPress version: 6.3.1
  • First release: Jan 4, 2018
  • Latest release: Jan 4, 2018
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: flavius12 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /695 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/socialplus/socialplus-widget.php+44
    Function create_function() is deprecated

Server metrics [RAM: ▼1.80MB] [CPU: ▼53.37ms] Passed 4 tests

A check of server-side resources used by SocialPlus
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.19 ▼1.274.68 ▼42.48
Dashboard /wp-admin2.21 ▼1.095.59 ▼39.26
Posts /wp-admin/edit.php2.21 ▼1.145.74 ▼43.65
Add New Post /wp-admin/post-new.php2.21 ▼3.686.07 ▼88.08
Media Library /wp-admin/upload.php2.21 ▼1.026.49 ▼24.91

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 28 new files
Database: no new tables, 13 new options
New WordPress options
socialplus_share_buttons
socialplus_profile_settings
widget_recent-comments
socialplus_share_settings
widget_socialplus_widget
can_compress_scripts
socialplus_profile_buttons
widget_recent-posts
db_upgraded
socialplus_profile_pos
...

Browser metrics Passed 4 tests

A check of browser resources used by SocialPlus
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5613.93 ▼0.421.78 ▼0.0238.35 ▼7.88
Dashboard /wp-admin2,216 ▲425.58 ▼0.1087.25 ▼12.1740.78 ▼2.87
Posts /wp-admin/edit.php2,131 ▲312.20 ▲0.2334.33 ▼7.9131.88 ▼9.00
Add New Post /wp-admin/post-new.php1,550 ▲2423.07 ▲0.22601.89 ▼7.1589.05 ▼0.14
Media Library /wp-admin/upload.php1,430 ▲304.20 ▲0.0196.07 ▼3.6447.39 ▲5.58

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/socialplus/socialplus-widget.php+44
    Function create_function() is deprecated
  • This plugin did not uninstall successfully, leaving 13 options in the database
    • socialplus_profile_settings
    • socialplus_profile_pos
    • widget_recent-comments
    • socialplus_share_pos
    • can_compress_scripts
    • socialplus_profile_buttons
    • socialplus_share_settings
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
Please fix the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/socialplus/socialplus-wrapper.php
    • > /wp-content/plugins/socialplus/socialplus.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/socialplus/socialplus-widget.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: share, social network, social

socialplus/socialplus.php 92% from 13 tests

The primary PHP file in "SocialPlus" version 1.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 229 characters long)

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
No dangerous file extensions were detected1,489 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP611235727
CSS51510581
PO File13636104
SVG120070
JavaScript1007

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity11.45
▷ Minimum class complexity1.00
▷ Maximum class complexity67.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods100
▷ Static methods5555.00%
▷ Public methods9999.00%
▷ Protected methods00.00%
▷ Private methods11.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin