10% social-engage

Code Review | Social Engage Plugin

WordPress plugin Social Engage Plugin scored10%from 54 tests.

About plugin

  • Plugin page: social-engage
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Nov 14, 2017
  • Latest release: Oct 30, 2018
  • Number of updates: 19
  • Update frequency: every 18.4 days
  • Top authors: ravinder855 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,547 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/social-engage/includes/se_widget.class.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; rfse_popular_posts_widget has a deprecated constructor

Server metrics [RAM: ▼1.87MB] [CPU: ▼49.16ms] Passed 4 tests

Analyzing server-side resources used by Social Engage Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.12 ▼1.355.11 ▼33.65
Dashboard /wp-admin2.14 ▼1.176.47 ▼39.95
Posts /wp-admin/edit.php2.14 ▼1.226.34 ▼40.26
Add New Post /wp-admin/post-new.php2.14 ▼3.756.85 ▼82.77
Media Library /wp-admin/upload.php2.14 ▼1.096.20 ▼29.02

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
rfse_activation_date
widget_recent-comments
widget_recent-posts
widget_rfse_popular_posts_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Social Engage Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5313.28 ▼1.284.46 ▲2.5047.56 ▲3.35
Dashboard /wp-admin2,223 ▲435.81 ▲0.2387.80 ▲4.7939.19 ▼3.04
Posts /wp-admin/edit.php2,125 ▲252.27 ▲0.3133.14 ▼2.6635.18 ▲0.01
Add New Post /wp-admin/post-new.php1,711 ▲18324.80 ▲1.61617.71 ▼65.3455.77 ▼14.41
Media Library /wp-admin/upload.php1,428 ▲284.41 ▲0.2497.06 ▼4.4446.08 ▲2.04

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/social-engage/includes/se_widget.class.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; rfse_popular_posts_widget has a deprecated constructor
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_rfse_popular_posts_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • rfse_activation_date
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-engage/dashboard.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-engage/init.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/social-engage/includes/se_widget.class.php:3

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: social media analytics, stats, social metrics, social counts, social sharing

social-engage/init.php 85% from 13 tests

The main PHP script in "Social Engage Plugin" version 1.1.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 228 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("social-engage.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin631 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP36875334
JavaScript104160
CSS305137

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.33
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
6 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/sort_desc.png0.15KB0.25KB0.00%
images/sort_asc.png0.16KB0.25KB0.00%
includes/images/sort_both.png0.20KB0.29KB0.00%
includes/images/sort_desc.png0.15KB0.25KB0.00%
includes/images/sort_asc.png0.16KB0.25KB0.00%