10% social-crowd

Code Review | Social Crowd

WordPress plugin Social Crowd scored10%from 54 tests.

About plugin

  • Plugin page: social-crowd
  • Plugin version: 0.9.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 6.3.1
  • First release: May 20, 2011
  • Latest release: Jul 8, 2013
  • Number of updates: 89
  • Update frequency: every 8.8 days
  • Top authors: bdoga (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

80+ active /26,343 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/social-crowd/sc_functions.php+273
    Undefined variable: result

Server metrics [RAM: ▼1.70MB] [CPU: ▼53.17ms] Passed 4 tests

Server-side resources used by Social Crowd
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.29 ▼1.178.77 ▼34.50
Dashboard /wp-admin2.30 ▼1.0010.86 ▼51.85
Posts /wp-admin/edit.php2.30 ▼1.0511.81 ▼34.99
Add New Post /wp-admin/post-new.php2.30 ▼3.589.67 ▼91.33
Media Library /wp-admin/upload.php2.30 ▼0.9311.39 ▼25.39
Social Crowd /wp-admin/options-general.php?page=social-crowd/social_crowd.php2.3011.15

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 117 new files
Database: no new tables, 13 new options
New WordPress options
Social_Crowd_Options
Social_Crowd_Version
widget_sc-widget
widget_recent-posts
Social_Crowd_Stats
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
Social_Crowd_Timer
...

Browser metrics Passed 4 tests

Social Crowd: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3213.91 ▼0.441.84 ▼0.1743.75 ▲1.58
Dashboard /wp-admin2,202 ▲225.62 ▼0.0590.29 ▼8.5442.13 ▼0.60
Posts /wp-admin/edit.php2,107 ▲71.95 ▼0.0734.45 ▼1.6232.53 ▼3.60
Add New Post /wp-admin/post-new.php1,534 ▲823.26 ▲0.04600.10 ▼111.8851.91 ▲0.31
Media Library /wp-admin/upload.php1,407 ▲74.18 ▲0.0296.69 ▼14.2747.54 ▼1.69
Social Crowd /wp-admin/options-general.php?page=social-crowd/social_crowd.php9621.9925.9148.84

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
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in SC_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin does not fully uninstall, leaving 13 options in the database
    • Social_Crowd_Version
    • widget_recent-posts
    • widget_sc-widget-advanced
    • Social_Crowd_Stats
    • Social_Crowd_Timer
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_sc-widget
    • Social_Crowd_Options
    • can_compress_scripts
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=social-crowd/social_crowd.php
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in SC_Widget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=social-crowd/social_crowd.php
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in SC_Widget_Advanced is deprecated since version 4.3.0! Use __construct() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=social-crowd/social_crowd.php
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=social-crowd/social_crowd.php
    • > Warning in wp-content/plugins/social-crowd/sc_options.php+272
    Use of undefined constant curl - assumed 'curl' (this will throw an Error in a future version of PHP)

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
Please fix the following items
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/social-crowd/sc_widget_advanced.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/social-crowd/social_crowd.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/social-crowd/sc_widget.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/social-crowd/sc_display_horiz.php:160
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/social-crowd/sc_display.php:100

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (26 tag instead of maximum 10)
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Admin Interface), #2 (Example Widget Output), #3 (Simple Widget Interface), #4 (Example Designer Custom Usage)
The official readme.txt might help

social-crowd/social_crowd.php 85% from 13 tests

The primary PHP file in "Social Crowd" version 0.9.6.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("social-crowd.php" instead of "social_crowd.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 232 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin1,366 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP82642261,366

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.50
Average class complexity26.00
▷ Minimum class complexity20.00
▷ Maximum class complexity32.00
Average method complexity7.25
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
100 compressed PNG files occupy 0.48MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/thumb-up.png1.14KB1.28KB0.00%
images/large/socialballoon/twitter.png2.90KB2.08KB▼ 28.25%
images/edit.png0.67KB0.83KB0.00%
images/large/aquaticus/facebook.png2.16KB1.78KB▼ 17.66%
images/flickr.png0.95KB1.23KB0.00%