73% viral-sign-ups

Code Review | Viral Sign Ups

WordPress plugin Viral Sign Ups scored73%from 54 tests.

About plugin

  • Plugin page: viral-sign-ups
  • Plugin version: 1.0.11
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.7.4
  • WordPress version: 6.3.1
  • First release: Oct 20, 2014
  • Latest release: May 9, 2017
  • Number of updates: 55
  • Update frequency: every 17.0 days
  • Top authors: globeorange (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

60+ active /14,924 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼1.21MB] [CPU: ▼43.44ms] Passed 4 tests

A check of server-side resources used by Viral Sign Ups
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.75 ▼0.7113.03 ▼28.70
Dashboard /wp-admin2.80 ▼0.5015.30 ▼36.52
Posts /wp-admin/edit.php2.80 ▼0.5615.00 ▼33.44
Add New Post /wp-admin/post-new.php2.80 ▼3.0915.95 ▼73.79
Media Library /wp-admin/upload.php2.80 ▼0.4315.49 ▼29.99

Server storage [IO: ▲0.33MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Viral Sign Ups: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,919 ▲15813.64 ▼0.906.85 ▲5.2140.74 ▼2.64
Dashboard /wp-admin2,210 ▲395.59 ▼0.0487.65 ▼13.5253.87 ▲10.11
Posts /wp-admin/edit.php2,118 ▲181.95 ▼0.0438.58 ▲1.0132.90 ▼1.83
Add New Post /wp-admin/post-new.php1,556 ▲3023.15 ▼0.54651.46 ▼33.69165.66 ▲114.05
Media Library /wp-admin/upload.php1,415 ▲154.11 ▼0.02102.88 ▼7.1144.52 ▼2.93

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5453
    Function get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead.
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/viral-sign-ups/inc/shortcodes.php:51
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_currentuserinfo() in wp-content/plugins/viral-sign-ups/inc/default_settings.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/viral-sign-ups/config.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/viral-sign-ups/config.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #7 (Powerful reports)
  • Donate link: Invalid url: ""
Please take inspiration from this readme.txt

viral-sign-ups/viralsignups.php 77% from 13 tests

The entry point to "Viral Sign Ups" version 1.0.11 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("viral-sign-ups.php" instead of "viralsignups.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: The description should be shorter than 140 characters (currently 182 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin3,002 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP102907551,400
CSS44971971
JavaScript48448631

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity20.20
▷ Minimum class complexity2.00
▷ Maximum class complexity31.00
Average method complexity2.19
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods81
▷ Static methods2632.10%
▷ Public methods81100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants1292.31%
▷ Class constants17.69%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
12 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/img/stripe/1.png2.63KB1.86KB▼ 29.39%
assets/img/social_sprite.png1.70KB0.65KB▼ 61.98%
assets/admin/img/Pro-VSU.png4.40KB2.48KB▼ 43.58%
assets/admin/img/stripe/3.png1.07KB0.24KB▼ 77.84%
assets/admin/img/stripe.png9.24KB4.46KB▼ 51.76%