83% wi-contact-form-7-for-elementor

Code Review | WI Contact Form 7 for Elementor

WordPress plugin WI Contact Form 7 for Elementor scored83%from 54 tests.

About plugin

  • Plugin page: wi-contact-form-7...
  • Plugin version: 1...
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.8.2
  • WordPress version: 6.3.1
  • First release: Sep 29, 2017
  • Latest release: Sep 29, 2017
  • Number of updates: 9
  • Update frequency: N/A
  • Top authors: iwebinside (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,584 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▲0.61ms] Passed 4 tests

Server-side resources used by WI Contact Form 7 for Elementor
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.63 ▼5.35
Dashboard /wp-admin3.31 ▲0.0152.88 ▲3.34
Posts /wp-admin/edit.php3.36 ▲0.0150.79 ▼0.03
Add New Post /wp-admin/post-new.php5.89 ▲0.0193.53 ▲4.46
Media Library /wp-admin/upload.php3.24 ▲0.0140.69 ▲5.25

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

WI Contact Form 7 for Elementor: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.102.07 ▼0.1442.82 ▲0.51
Dashboard /wp-admin2,206 ▲185.85 ▲0.98107.63 ▼6.5241.51 ▼3.55
Posts /wp-admin/edit.php2,086 ▼62.03 ▼0.0039.33 ▼1.5034.28 ▼2.62
Add New Post /wp-admin/post-new.php1,535 ▲2123.39 ▲5.81660.97 ▼38.1557.50 ▲6.18
Media Library /wp-admin/upload.php1,388 ▼34.24 ▲0.07113.74 ▲7.2050.64 ▲7.63

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

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)
Everything seems fine, however 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Elementor\\add_action() in wp-content/plugins/wi-contact-form-7-for-elementor/inc/elementor-helper.php:14

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

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed: You can look at the official readme.txt

wi-contact-form-7-for-elementor/webinside-elementor-contact-form-7-addon.php 77% from 13 tests

The main file in "WI Contact Form 7 for Elementor" v. 1... serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Version: Use periods and digits only for your plugin's version number (ex. "1.0.3" instead of "1...")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wi-contact-form-7-for-elementor.php" instead of "webinside-elementor-contact-form-7-addon.php")

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
Success! There were no dangerous files found in this plugin558 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP55716467
PO File1404591
CSS1030

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.29
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods457.14%
▷ Protected methods342.86%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png3.74KB2.25KB▼ 39.76%
assets/screenshot-2.png5.71KB2.12KB▼ 62.93%
assets/screenshot-3.png17.70KB5.32KB▼ 69.92%
assets/screenshot-4.png11.02KB3.45KB▼ 68.74%
assets/screenshot-1.png52.38KB14.83KB▼ 71.68%