83% wcsociality

Code Review | WCSociality

WordPress plugin WCSociality scored83%from 54 tests.

About plugin

  • Plugin page: wcsociality
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-4.8.2
  • WordPress version: 6.3.1
  • First release: Oct 18, 2017
  • Latest release: Oct 18, 2017
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: po5ept (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /573 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.58ms] Passed 4 tests

Analyzing server-side resources used by WCSociality
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.48 ▼3.92
Dashboard /wp-admin3.32 ▼0.0248.13 ▼14.92
Posts /wp-admin/edit.php3.43 ▲0.0850.07 ▼0.54
Add New Post /wp-admin/post-new.php5.92 ▲0.0393.71 ▼14.94
Media Library /wp-admin/upload.php3.24 ▲0.0138.01 ▲3.03

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for WCSociality
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲14513.56 ▼0.827.95 ▲5.9742.37 ▼2.33
Dashboard /wp-admin2,234 ▲575.83 ▲0.0292.57 ▲5.1141.89 ▼0.60
Posts /wp-admin/edit.php2,144 ▲472.28 ▲0.2741.74 ▲2.3036.01 ▲4.59
Add New Post /wp-admin/post-new.php1,557 ▲3123.59 ▲6.12608.74 ▲6.6734.37 ▼20.29
Media Library /wp-admin/upload.php1,433 ▲304.43 ▲0.00104.26 ▼0.3644.42 ▼0.86

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • wcs__settings

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 16× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WCSociality' not found in wp-content/plugins/wcsociality/inc/WCS_Rating.php:3
    • > PHP Notice
      Undefined variable: current in wp-content/plugins/wcsociality/template/admin/liker.php on line 1
    • > PHP Notice
      Undefined variable: current in wp-content/plugins/wcsociality/template/admin/useful.php on line 1
    • > PHP Notice
      Undefined variable: liker in wp-content/plugins/wcsociality/template/liker.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to a member function wcs_is_disabled() on null in wp-content/plugins/wcsociality/template/liker.php:1
    • > PHP Fatal error
      Uncaught Error: Call to a member function wcs_is_disabled() on null in wp-content/plugins/wcsociality/template/rating.php:1
    • > PHP Notice
      Undefined variable: rating in wp-content/plugins/wcsociality/template/rating.php on line 1
    • > PHP Notice
      Undefined variable: current in wp-content/plugins/wcsociality/template/admin/rating.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to a member function wcs_is_disabled() on null in wp-content/plugins/wcsociality/template/useful.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wcsociality/template/admin/liker.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected


Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Rating settings on plugin settings page.), #2 (Likes settings on plugin settings page.), #3 (Useful settings on plugin settings page.)
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wcsociality === )
The official readme.txt might help

wcsociality/wcsociality.php 85% from 13 tests

The primary PHP file in "WCSociality" version 1.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 173 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected3,686 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PO File1353688

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.60
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.81
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
▷ Abstract classes240.00%
▷ Concrete classes360.00%
▷ Final classes00.00%
▷ Static methods531.25%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions19100.00%
▷ Anonymous functions00.00%
▷ Global constants7100.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
PNG images were not found in this plugin