84% importer-for-gravity-forms-and-nationbuilder

Code Review | Importer for Gravity Forms and NationBuilder

WordPress plugin Importer for Gravity Forms and NationBuilder scored 84% from 54 tests.

About plugin

  • Plugin page: importer-for-grav...
  • Plugin version: 0.3.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.6.1
  • WordPress version: 6.3.1
  • First release: Apr 23, 2016
  • Latest release: Nov 7, 2016
  • Number of updates: 9
  • Update frequency: every 22.0 days
  • Top authors: dabernathy89 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,294 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
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼4.91ms] Passed 4 tests

An overview of server-side resources used by Importer for Gravity Forms and NationBuilder
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0936.28 ▼7.71
Dashboard /wp-admin3.39 ▲0.0944.81 ▼8.09
Posts /wp-admin/edit.php3.51 ▲0.1548.81 ▲0.01
Add New Post /wp-admin/post-new.php5.97 ▲0.0989.30 ▼3.85
Media Library /wp-admin/upload.php3.31 ▲0.0933.95 ▲1.97

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Importer for Gravity Forms and NationBuilder
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.46 ▼0.911.79 ▼0.1240.09 ▼5.17
Dashboard /wp-admin2,197 ▲125.84 ▲0.9493.15 ▼21.7838.58 ▼9.16
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0136.64 ▼1.5932.49 ▼3.51
Add New Post /wp-admin/post-new.php1,537 ▲323.37 ▲0.18619.35 ▼64.6654.96 ▲5.36
Media Library /wp-admin/upload.php1,388 ▼34.28 ▲0.0993.37 ▼8.0342.22 ▼2.13

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/importer-for-gravity-forms-and-nationbuilder/gf-nb-importer.php:291
    • > PHP Fatal error
      Uncaught Error: Interface 'OAuth2\\GrantType\\IGrantType' not found in wp-content/plugins/importer-for-gravity-forms-and-nationbuilder/includes/vendor/OAuth2/GrantType/AuthorizationCode.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'OAuth2\\GrantType\\IGrantType' not found in wp-content/plugins/importer-for-gravity-forms-and-nationbuilder/includes/vendor/OAuth2/GrantType/ClientCredentials.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'OAuth2\\GrantType\\IGrantType' not found in wp-content/plugins/importer-for-gravity-forms-and-nationbuilder/includes/vendor/OAuth2/GrantType/RefreshToken.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'OAuth2\\GrantType\\IGrantType' not found in wp-content/plugins/importer-for-gravity-forms-and-nationbuilder/includes/vendor/OAuth2/GrantType/Password.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'GFFeedAddOn' not found in wp-content/plugins/importer-for-gravity-forms-and-nationbuilder/includes/class-gravity-forms-feed.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'GFAddOn' not found in wp-content/plugins/importer-for-gravity-forms-and-nationbuilder/includes/class-gravity-forms-main.php:8

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

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: nationbuilder, gravity forms

importer-for-gravity-forms-and-nationbuilder/gf-nb-importer.php 85% from 13 tests

The main PHP file in "Importer for Gravity Forms and NationBuilder" ver. 0.3.6 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • 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
  • Main file name: The principal plugin file should be the same as the plugin slug ("importer-for-gravity-forms-and-nationbuilder.php" instead of "gf-nb-importer.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin834 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP10160591826
CSS1108

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity8.83
▷ Minimum class complexity1.00
▷ Maximum class complexity38.00
Average method complexity2.92
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces1
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods51
▷ Static methods611.76%
▷ Public methods4282.35%
▷ Protected methods611.76%
▷ Private methods35.88%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants33
▷ Global constants00.00%
▷ Class constants33100.00%
▷ Public constants33100.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 files were detected