84% contact-form-7-gravity-forms

Code Review | Contact Form 7 Gravity Forms Importer

WordPress plugin Contact Form 7 Gravity Forms Importer scored 84% from 54 tests.

About plugin

  • Plugin page: contact-form-7-gr...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.1
  • WordPress version: 6.3.1
  • First release: Sep 14, 2011
  • Latest release: Feb 9, 2015
  • Number of updates: 16
  • Update frequency: every 78.9 days
  • Top authors: katzwebdesign (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

300+ active / 14,652 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▲1.28ms] Passed 4 tests

This is a short check of server-side resources used by Contact Form 7 Gravity Forms Importer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.99 ▼0.65
Dashboard /wp-admin3.31 ▲0.0164.27 ▲3.64
Posts /wp-admin/edit.php3.36 ▲0.0055.34 ▲7.91
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.14 ▲7.09
Media Library /wp-admin/upload.php3.23 ▲0.0030.55 ▼4.98

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Contact Form 7 Gravity Forms Importer: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4314.42 ▲0.022.43 ▲0.4249.61 ▲0.94
Dashboard /wp-admin2,206 ▲184.85 ▼0.99115.73 ▼14.2446.71 ▼7.32
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0047.46 ▲3.9939.77 ▼4.74
Add New Post /wp-admin/post-new.php1,514 ▼2117.77 ▼5.61743.34 ▼61.8359.37 ▲2.95
Media Library /wp-admin/upload.php1,391 ▲34.19 ▼0.03103.46 ▼14.0943.83 ▼2.62

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

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 everything seems fine, this is not an exhaustive test

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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/contact-form-7-gravity-forms/contact-form-7-gravity-forms.php:46

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: Add an image for screenshot #1 (The import page)
You can take inspiration from this readme.txt

contact-form-7-gravity-forms/contact-form-7-gravity-forms.php Passed 13 tests

"Contact Form 7 Gravity Forms Importer" version 2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
61 characters long description:
Import your existing Contact Form 7 forms into Gravity Forms.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin650 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP114674562
PO File1242488

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity162.00
▷ Minimum class complexity162.00
▷ Maximum class complexity162.00
Average method complexity8.32
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods22
▷ Static methods1986.36%
▷ Public methods1986.36%
▷ Protected methods14.55%
▷ Private methods29.09%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/gravity-import-icon-32.png1.94KB1.05KB▼ 45.75%