73% viral-signup

Code Review | Viral Signup - limited opt-in with viral refferal sharing

WordPress plugin Viral Signup - limited opt-in with viral refferal sharing scored 73% from 54 tests.

About plugin

  • Plugin page: viral-signup
  • Plugin version: 2.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.2
  • WordPress version: 6.3.1
  • First release: Jun 18, 2016
  • Latest release: Mar 22, 2023
  • Number of updates: 54
  • Update frequency: every 45.7 days
  • Top authors: Wpcalc (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active / 4,334 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Viral Signup - limited opt-in with viral refferal sharing
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.67 ▲0.93
Dashboard /wp-admin3.32 ▲0.0244.64 ▼1.75
Posts /wp-admin/edit.php3.37 ▲0.0146.12 ▼0.16
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.01 ▼5.73
Media Library /wp-admin/upload.php3.24 ▲0.0133.57 ▲2.12

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 66 new files
Database: 1 new table, 6 new options
New tables
wp_wow_signup_free
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Viral Signup - limited opt-in with viral refferal sharing
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲8313.66 ▼0.641.64 ▼0.5542.08 ▼8.01
Dashboard /wp-admin2,224 ▲365.86 ▲0.93107.02 ▼8.8537.36 ▼10.03
Posts /wp-admin/edit.php2,107 ▲182.05 ▲0.0036.77 ▲0.7332.26 ▼1.62
Add New Post /wp-admin/post-new.php1,529 ▲1523.44 ▲5.75670.14 ▼12.2262.18 ▲8.44
Media Library /wp-admin/upload.php1,406 ▲154.20 ▼0.0295.67 ▼0.3742.91 ▼0.13

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/viral-signup/admin/admin.php+27
    Undefined index: wow_nonce_field
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/viral-signup/admin/partials/signup/menu.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/viral-signup/admin/partials/signup/menu.php:16

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 90% from 29 tests

readme.txt 88% 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: Add images for these screenshots: #1 (Example of a signup form with a limited amount of available spaces), #2 (Enable viral sharing and ask your visitors to bring referrals), #3 (Overview), #4 (Features), #5 (Simple signup mode), #6 (Simple signup + Viral sharing mode), #7 (Limited signup mode), #8 (Limited signup + Viral sharing mode), #9 (Wow Viral Signups setup example), #10 (Pro version features)
  • Tags: Please delete some tags, you are using 25 tag instead of maximum 10
The official readme.txt might help

viral-signup/viral-signup.php 92% from 13 tests

The main PHP script in "Viral Signup - limited opt-in with viral refferal sharing" version 2.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected3,420 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PO File23416741,385
PHP201222301,363
JavaScript43326476
CSS3280196

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity27.00
▷ Minimum class complexity21.00
▷ Maximum class complexity37.00
Average method complexity3.05
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods38
▷ Static methods00.00%
▷ Public methods718.42%
▷ Protected methods00.00%
▷ Private methods3181.58%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants19.09%
▷ Class constants1090.91%
▷ Public constants10100.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
12 compressed PNG files occupy 0.22MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/partials/signup/items/countdowns.png20.92KB21.96KB0.00%
admin/partials/signup/items/forms.png16.85KB18.15KB0.00%
admin/partials/signup/items/skype.png16.44KB17.14KB0.00%
admin/partials/signup/items/modal-windows.png24.38KB25.78KB0.00%
public/signup/css/tw.png1.28KB0.65KB▼ 49.70%