62% go-viral

Code Review | Go Viral - social share, social sharebar, social locker, social chat, open graph, reactions, share & view counters

WordPress plugin Go Viral - social share, social sharebar, social locker, social chat, open graph, reactions, share & view counters scored62%from 54 tests.

About plugin

  • Plugin page: go-viral
  • Plugin version: 1.8.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.1
  • WordPress version: 6.3.1
  • First release: Nov 20, 2019
  • Latest release: Jan 30, 2023
  • Number of updates: 43
  • Update frequency: every 27.1 days
  • Top authors: gowebsmarty (93.02%)gwsharsha (9.3%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /5,800 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲4.67MB] [CPU: ▲23.99ms] Passed 4 tests

An overview of server-side resources used by Go Viral - social share, social sharebar, social locker, social chat, open graph, reactions, share & view counters
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /8.47 ▲5.0064.69 ▲24.01
Dashboard /wp-admin8.49 ▲5.1882.52 ▲32.86
Posts /wp-admin/edit.php8.49 ▲5.1375.06 ▲22.02
Add New Post /wp-admin/post-new.php9.26 ▲3.37119.26 ▲17.05
Media Library /wp-admin/upload.php8.49 ▲5.2673.41 ▲35.30
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius8.4961.84

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 232 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-comments
fs_gdpr
widget_theysaidso_widget
fs_accounts
widget_recent-posts
can_compress_scripts
db_upgraded
fs_debug_mode
fs_active_plugins
theysaidso_admin_options

Browser metrics Passed 4 tests

Go Viral - social share, social sharebar, social locker, social chat, open graph, reactions, share & view counters: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,070 ▲29915.88 ▲1.1314.75 ▲13.0237.31 ▼11.65
Dashboard /wp-admin2,338 ▲1504.96 ▲0.09113.77 ▼5.7688.26 ▲44.02
Posts /wp-admin/edit.php2,239 ▲1502.07 ▼0.0737.82 ▼0.5934.43 ▼0.76
Add New Post /wp-admin/post-new.php1,799 ▲28021.20 ▼1.74734.98 ▲107.1128.68 ▼33.08
Media Library /wp-admin/upload.php1,532 ▲1414.19 ▲0.06124.87 ▲13.7584.58 ▲36.22
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,1981.7333.5630.31

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/go-viral/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 10 options
    • fs_debug_mode
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • fs_gdpr
    • widget_recent-posts
    • fs_accounts
    • fs_active_plugins

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=freemius
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+204
    Undefined offset: 0
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=freemius
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
    Trying to get property 'guid' of non-object
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=freemius
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+221
    Trying to get property 'ID' of non-object
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=freemius
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+222
    Trying to get property 'post_title' of non-object

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/go-viral/go-viral.php
  • 11× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant GOVR_URL - assumed 'GOVR_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/go-viral/admin/includes/govr-opts.php on line 501
    • > PHP Warning
      Use of undefined constant GOVR_PATH - assumed 'GOVR_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/go-viral/inc/govr-core.php on line 4
    • > PHP Warning
      Use of undefined constant GOVR_URL - assumed 'GOVR_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/go-viral/admin/includes/govr-opts.php on line 541
    • > PHP Warning
      Use of undefined constant GOVR_URL - assumed 'GOVR_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/go-viral/admin/includes/govr-opts.php on line 309
    • > PHP Warning
      Use of undefined constant GOVR_URL - assumed 'GOVR_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/go-viral/admin/includes/govr-opts.php on line 249
    • > PHP Fatal error
      require_once(): Failed opening required 'GOVR_PATHinc/modules/govr-analytics.php' (include_path='.:/usr/share/php') in wp-content/plugins/go-viral/inc/govr-core.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/go-viral/inc/fbcommentbox.php:3
    • > PHP Warning
      Use of undefined constant GOVR_URL - assumed 'GOVR_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/go-viral/admin/includes/govr-opts.php on line 418
    • > PHP Warning
      Use of undefined constant GOVR_URL - assumed 'GOVR_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/go-viral/admin/includes/govr-opts.php on line 369
    • > PHP Warning
      require_once(GOVR_PATHinc/modules/govr-analytics.php): failed to open stream: No such file or directory in wp-content/plugins/go-viral/inc/govr-core.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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: 15 tag instead of maximum 10
You can look at the official readme.txt

go-viral/go-viral.php Passed 13 tests

This is the main PHP file of "Go Viral - social share, social sharebar, social locker, social chat, open graph, reactions, share & view counters" version 1.8.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
78 characters long description:
Powerful social tools to engage audience, build trust, motivate social sharing

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected45,043 lines of code in 154 files:
LanguageFilesBlank linesComment linesLines of code
PHP1247,52416,36832,234
SVG3009,552
CSS17208211,438
Sass226551,333
JavaScript7108110436
PO File1171750

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please tend to the following items
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 2,910)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity74.19
▷ Minimum class complexity1.00
▷ Maximum class complexity2,910.00
Average method complexity4.68
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes58
▷ Abstract classes23.45%
▷ Concrete classes5696.55%
▷ Final classes00.00%
Methods1,184
▷ Static methods17614.86%
▷ Public methods84471.28%
▷ Protected methods151.27%
▷ Private methods32527.45%
Functions95
▷ Named functions95100.00%
▷ Anonymous functions00.00%
Constants130
▷ Global constants10580.77%
▷ Class constants2519.23%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
16 PNG files occupy 0.38MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/assets/cry.png18.19KB6.65KB▼ 63.44%
public/assets/wink.png10.63KB4.91KB▼ 53.83%
admin/assets/logo.png5.99KB2.02KB▼ 66.32%
admin/assets/premium-messenger.png17.71KB9.45KB▼ 46.64%
admin/assets/premium-imgshare.png100.31KB48.20KB▼ 51.95%