84% gravity-forms-janrain-add-on

Code Review | Gravity Forms Janrain Add-on

WordPress plugin Gravity Forms Janrain Add-on scored84%from 54 tests.

About plugin

  • Plugin page: gravity-forms-jan...
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.5
  • WordPress version: 6.3.1
  • First release: Dec 19, 2012
  • Latest release: Aug 19, 2013
  • Number of updates: 17
  • Update frequency: every 14.3 days
  • Top authors: goldenapples (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,595 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼9.03ms] Passed 4 tests

An overview of server-side resources used by Gravity Forms Janrain Add-on
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.0838.29 ▼3.98
Dashboard /wp-admin3.42 ▲0.0451.71 ▼10.96
Posts /wp-admin/edit.php3.54 ▲0.1447.11 ▼5.72
Add New Post /wp-admin/post-new.php6.00 ▲0.0889.38 ▼15.45
Media Library /wp-admin/upload.php3.35 ▲0.0735.81 ▲0.37

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Gravity Forms Janrain Add-on
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.28 ▼0.451.92 ▲0.1839.67 ▼0.41
Dashboard /wp-admin2,192 ▲185.62 ▼0.0384.62 ▼9.9339.75 ▼0.12
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0037.02 ▼1.8936.61 ▼0.77
Add New Post /wp-admin/post-new.php1,526 ▼323.52 ▲0.45690.56 ▲61.0454.71 ▲2.82
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.1096.55 ▼6.2942.88 ▼5.38

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please fix the following items
  • 3× 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/gravity-forms-janrain-add-on/ajax-response.php:55
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/gravity-forms-janrain-add-on/gravity-forms-janrain-add-on.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gravity-forms-janrain-add-on/admin-settings.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: forms, social login, form prefill

gravity-forms-janrain-add-on/gravity-forms-janrain-add-on.php Passed 13 tests

"Gravity Forms Janrain Add-on" version 0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
75 characters long description:
Integrate Gravity Forms with Janrain Engage social login to pre-fill forms.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin454 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4132205434
JavaScript12620

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin