84% wrap-form-fields-in-gravity-forms

Code Review | Wrap form fields in Gravity Forms

WordPress plugin Wrap form fields in Gravity Forms scored 84% from 54 tests.

About plugin

  • Plugin page: wrap-form-fields-...
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.8
  • WordPress version: 6.3.1
  • First release: May 12, 2016
  • Latest release: Aug 2, 2016
  • Number of updates: 5
  • Update frequency: every 77.4 days
  • Top authors: mRommel (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active / 6,523 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼0.87ms] Passed 4 tests

Server-side resources used by Wrap form fields in Gravity Forms
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.78 ▼3.70
Dashboard /wp-admin3.33 ▲0.0347.08 ▼1.66
Posts /wp-admin/edit.php3.38 ▲0.0348.68 ▲1.20
Add New Post /wp-admin/post-new.php5.91 ▲0.0395.49 ▲1.83
Media Library /wp-admin/upload.php3.26 ▲0.0333.87 ▲0.67

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Wrap form fields in Gravity Forms: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲8214.47 ▼0.091.68 ▼0.2940.46 ▼3.19
Dashboard /wp-admin2,223 ▲324.87 ▼0.09108.95 ▼7.1941.59 ▼5.80
Posts /wp-admin/edit.php2,106 ▲172.00 ▼0.0540.84 ▲5.0234.95 ▼0.89
Add New Post /wp-admin/post-new.php1,552 ▲1023.33 ▲5.10624.51 ▼12.2457.35 ▼2.59
Media Library /wp-admin/upload.php1,402 ▲174.29 ▲0.0994.48 ▼8.0043.02 ▼2.13

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

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 items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/wrap-form-fields-in-gravity-forms/js/rak_wrapper_admin.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wrap-form-fields-in-gravity-forms/gravity-forms-wrap-fields.php:19

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: forms, custom class, wrapper, gravity forms styling, gravity forms

wrap-form-fields-in-gravity-forms/gravity-forms-wrap-fields.php 85% from 13 tests

"Wrap form fields in Gravity Forms" version 0.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wrap-form-fields-in-gravity-forms.php" instead of "gravity-forms-wrap-fields.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected274 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP26556149
JavaScript152055
PO File1111246
CSS15024

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods777.78%
▷ Public methods888.89%
▷ Protected methods00.00%
▷ Private methods111.11%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin