10% social-features-for-wp

Code Review | Social Monster

WordPress plugin Social Monster scored 10% from 54 tests.

About plugin

  • Plugin page: social-features-f...
  • Plugin version: 1.0.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-4.5.2
  • WordPress version: 5.8.1
  • First release: Dec 16, 2013
  • Latest release: Jun 4, 2016
  • Number of updates: 46
  • Update frequency: every 19.6 days
  • Top authors: bogdan_nazar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,117 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure had errors
    • > Parse error in wp-content/plugins/social-features-for-wp/social-monster.php+1112
    syntax error, unexpected 'private' (T_PRIVATE), expecting case (T_CASE) or default (T_DEFAULT) or '}'

Server metrics [RAM: ▼0.00MB] [CPU: ▼141.77ms] Passed 4 tests

Analyzing server-side resources used by Social Monster
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1239.30 ▲13.83
Dashboard /wp-admin3.06 ▲0.0052.81 ▲3.06
Posts /wp-admin/edit.php3.11 ▲0.0049.23 ▲1.77
Add New Post /wp-admin/post-new.php5.42 ▼0.0297.75 ▼570.35
Media Library /wp-admin/upload.php3.01 ▲0.0030.15 ▼1.54

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 34 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Social Monster
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10716.33 ▲0.8211.50 ▲1.3550.87 ▼2.69
Dashboard /wp-admin2,970 ▲365.97 ▼0.00168.23 ▲16.70124.79 ▲9.28
Posts /wp-admin/edit.php2,739 ▼02.70 ▼0.0071.05 ▼5.9395.07 ▲4.23
Add New Post /wp-admin/post-new.php1,615 ▲3420.91 ▲4.25291.10 ▼177.08109.13 ▼19.16
Media Library /wp-admin/upload.php1,810 ▼05.00 ▼0.04165.57 ▲2.89123.94 ▲0.62

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/social-features-for-wp/sharer.php
    • > /wp-content/plugins/social-features-for-wp/templates/default/ru-RU.php
    • > /wp-content/plugins/social-features-for-wp/dashboard/ru-RU.php
    • > /wp-content/plugins/social-features-for-wp/lang.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Parse error
      syntax error, unexpected 'private' (T_PRIVATE), expecting case (T_CASE) or default (T_DEFAULT) or '}' in wp-content/plugins/social-features-for-wp/social-monster.php on line 1112

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Donate link: Invalid URI found ("")
The official readme.txt is a good inspiration

social-features-for-wp/social-monster.php 92% from 13 tests

The principal PHP file in "Social Monster" v. 1.0.10 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("social-features-for-wp.php" instead of "social-monster.php")

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
Good job! No executable or dangerous file extensions detected5,665 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3152152,864
PHP534402,090
CSS300711

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity101.75
▷ Minimum class complexity1.00
▷ Maximum class complexity396.00
Average method complexity13.90
▷ Minimum method complexity1.00
▷ Maximum method complexity70.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes4100.00%
Methods32
▷ Static methods412.50%
▷ Public methods1443.75%
▷ Protected methods00.00%
▷ Private methods1856.25%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants65
▷ Global constants65100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
13 PNG files occupy 0.11MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
dashboard/images/icons32.png1.00KB0.95KB▼ 5.08%
dashboard/images/popup/pu20.png1.96KB1.83KB▼ 6.66%
dashboard/images/pay/qiwi.png4.49KB3.05KB▼ 32.17%
dashboard/images/popup/pu24.png3.99KB2.28KB▼ 42.69%
dashboard/images/btn-ud.png1.32KB1.35KB0.00%