77% wp-real-time-social-proof

Code Review | WP Real-Time Social-Proof

WordPress plugin WP Real-Time Social-Proof scored77%from 54 tests.

About plugin

  • Plugin page: wp-real-time-soci...
  • Plugin version: 2.2.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.4-5.6
  • WordPress version: 6.3.1
  • First release: Jun 24, 2018
  • Latest release: Jan 12, 2021
  • Number of updates: 113
  • Update frequency: every 8.3 days
  • Top authors: varun21 (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

300+ active /15,289 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.47MB] [CPU: ▼3.87ms] Passed 4 tests

This is a short check of server-side resources used by WP Real-Time Social-Proof
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.94 ▲0.4841.11 ▼1.11
Dashboard /wp-admin3.81 ▲0.5052.57 ▼1.96
Posts /wp-admin/edit.php3.87 ▲0.5150.64 ▼1.98
Add New Post /wp-admin/post-new.php6.33 ▲0.4486.24 ▼10.42
Media Library /wp-admin/upload.php3.68 ▲0.4440.30 ▲2.42
All Social Proofs /wp-admin/edit.php?post_type=socialproof3.7238.70
Add New Social Proof /wp-admin/post-new.php?post_type=socialproof3.7247.64
Hero Support /wp-admin/edit.php?post_type=socialproof&page=wprtsp-support3.6445.65
Social Proof /wp-admin/options-general.php?page=wprtsp3.6433.98
WP Real-Time Social-Proof /wp-admin/index.php?page=wprtsp-firstrun3.6434.54

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 237 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
wprtsp_firstrun
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WP Real-Time Social-Proof
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲12613.33 ▼1.221.60 ▼0.2238.55 ▼8.79
Dashboard /wp-admin2,278 ▲904.92 ▼0.9897.48 ▼9.7385.81 ▲40.34
Posts /wp-admin/edit.php2,160 ▲712.02 ▲0.0334.66 ▼4.3937.91 ▲3.09
Add New Post /wp-admin/post-new.php1,583 ▲4123.13 ▲4.67693.67 ▲38.7463.76 ▲8.99
Media Library /wp-admin/upload.php1,454 ▲664.13 ▼0.1097.76 ▼5.1671.47 ▲25.25
All Social Proofs /wp-admin/edit.php?post_type=socialproof1,1131.9532.9968.92
Add New Social Proof /wp-admin/post-new.php?post_type=socialproof3,0489.29353.15107.21
Hero Support /wp-admin/edit.php?post_type=socialproof&page=wprtsp-support8642.0139.1567.14
Social Proof /wp-admin/options-general.php?page=wprtsp1,7872.7734.5681.96
WP Real-Time Social-Proof /wp-admin/index.php?page=wprtsp-firstrun1,0032.1724.8170.49

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • wprtsp_firstrun
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-real-time-social-proof/inc/meta.php:26

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/post-new.php?post_type=socialproof
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).sortable is not a function" "TypeError: $(...).sortable is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/post-new.php?post_type=socialproof:437:52)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=socialproof
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).sortable is not a function

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 your attention:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (screenshot-1.png), #2 (screenshot-2.png), #3 (screenshot-3.png), #4 (screenshot-4.png), #5 (screenshot-5.png), #6 (screenshot-6.png)
Please take inspiration from this readme.txt

wp-real-time-social-proof/wprtsp.php 85% from 13 tests

The primary PHP file in "WP Real-Time Social-Proof" version 2.2.6 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-real-time-social-proof.php" instead of "wprtsp.php")
  • 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 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin4,793 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP3227811,702
CSS53541581,460
SVG15434865
JavaScript43510495
Sass1540271

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity59.75
▷ Minimum class complexity3.00
▷ Maximum class complexity112.00
Average method complexity3.37
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods101
▷ Static methods43.96%
▷ Public methods10099.01%
▷ Protected methods00.00%
▷ Private methods10.99%
Functions10
▷ Named functions440.00%
▷ Anonymous functions660.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.98MB with 0.49MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png25.48KB14.35KB▼ 43.66%
screenshot-6.png434.37KB197.22KB▼ 54.60%
screenshot-2.png36.20KB18.81KB▼ 48.04%
screenshot-3.png32.98KB18.79KB▼ 43.03%
screenshot-1.png30.57KB11.72KB▼ 61.67%