73% invite-friends-to-register

Code Review | Invite Friends to Register

WordPress plugin Invite Friends to Register scored73%from 54 tests.

About plugin

  • Plugin page: invite-friends-to...
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5
  • WordPress version: 6.3.1
  • First release: Sep 3, 2012
  • Latest release: Nov 13, 2012
  • Number of updates: 8
  • Update frequency: every 8.9 days
  • Top authors: tammyhart (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /10,079 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.01ms] Passed 4 tests

A check of server-side resources used by Invite Friends to Register
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0540.54 ▼4.50
Dashboard /wp-admin3.37 ▲0.0648.67 ▼3.30
Posts /wp-admin/edit.php3.42 ▲0.0647.19 ▼0.48
Add New Post /wp-admin/post-new.php5.95 ▲0.0687.38 ▼7.76
Media Library /wp-admin/upload.php3.29 ▲0.0643.82 ▲6.33
Invite Friends /wp-admin/options-general.php?page=invite-friends-settings3.2330.19
Invite Friends /wp-admin/users.php?page=invite-friends3.3132.17

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Invite Friends to Register
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.74 ▲0.551.85 ▲0.2244.74 ▼0.83
Dashboard /wp-admin2,200 ▲235.61 ▼0.0699.54 ▲13.9241.05 ▲1.88
Posts /wp-admin/edit.php2,105 ▲22.01 ▼0.0036.79 ▼2.7333.23 ▼2.10
Add New Post /wp-admin/post-new.php1,532 ▲623.48 ▲0.30692.07 ▲3.7358.07 ▲2.11
Media Library /wp-admin/upload.php1,408 ▲54.20 ▼0.0598.10 ▼5.1346.14 ▼0.49
Invite Friends /wp-admin/options-general.php?page=invite-friends-settings8672.0324.6827.00
Invite Friends /wp-admin/users.php?page=invite-friends8712.1527.8926.48

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/users.php?page=invite-friends
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/users.php?page=invite-friends
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/invite-friends-to-register/inc/sendmail.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/invite-friends-to-register/inc/registration.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/invite-friends-to-register/invite-friends-to-register.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/invite-friends-to-register/inc/settings.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/invite-friends-to-register/inc/inviteform.php:117

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/users.php?page=invite-friends
    • > 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: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/invite-friends-to-register/invfr.js?ver=6.3.1:5:23)\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/users.php?page=invite-friends
    • > 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: jQuery(...).live is not a function

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: invite, mail, registration, users

invite-friends-to-register/invite-friends-to-register.php Passed 13 tests

"Invite Friends to Register" version 0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
80 characters long description:
Use this plugin to allow users to invite their friends to register on your site.

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 plugin341 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP657103269
CSS110148
JavaScript14424

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin