78% abandoned-contact-form-7

Code Review | Abandoned Contact Form 7

WordPress plugin Abandoned Contact Form 7 scored 78% from 54 tests.

About plugin

  • Plugin page: abandoned-contact...
  • Plugin version: 1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.7
  • WordPress version: 5.8.1
  • First release: Sep 17, 2020
  • Latest release: Jul 2, 2021
  • Number of updates: 17
  • Update frequency: every 16.9 days
  • Top authors: zealopensource (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active / 694 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.00MB] [CPU: ▼148.48ms] Passed 4 tests

Analyzing server-side resources used by Abandoned Contact Form 7
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0024.59 ▲1.41
Dashboard /wp-admin3.06 ▼0.0029.91 ▼7.41
Posts /wp-admin/edit.php3.11 ▲0.0031.27 ▲0.96
Add New Post /wp-admin/post-new.php5.42 ▼0.0267.42 ▼586.91
Media Library /wp-admin/upload.php3.00 ▲0.0023.21 ▼0.55
Mail Notification Settings /wp-admin/edit.php?post_type=cf7af_data&page=cf7af-setting2.7513.98
Send Mail /wp-admin/admin.php?page=cf7af-send-mail2.7513.94
All Abandoned Users /wp-admin/edit.php?post_type=cf7af_data2.8216.34

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, 1 new option
New WordPress options
cf7af_mail_notify_option

Browser metrics Passed 4 tests

An overview of browser requirements for Abandoned Contact Form 7
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,666 ▲6515.89 ▲0.225.08 ▼0.0774.03 ▼3.62
Dashboard /wp-admin2,933 ▲376.10 ▼0.19114.96 ▼17.53168.08 ▼6.26
Posts /wp-admin/edit.php2,740 ▼03.22 ▲0.0064.94 ▼2.73138.37 ▲2.13
Add New Post /wp-admin/post-new.php3,743 ▼6419.18 ▲0.47427.93 ▼6.84161.43 ▼7.30
Media Library /wp-admin/upload.php1,752 ▲35.53 ▲0.04148.81 ▲8.79176.40 ▼6.48
Mail Notification Settings /wp-admin/edit.php?post_type=cf7af_data&page=cf7af-setting280.940.0316.71
Send Mail /wp-admin/admin.php?page=cf7af-send-mail280.940.0317.83
All Abandoned Users /wp-admin/edit.php?post_type=cf7af_data280.940.0318.19

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • cf7af_mail_notify_option

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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: Class 'WPCF7_ContactForm' not found in wp-content/plugins/abandoned-contact-form-7/inc/admin/template/cf7af.template.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/abandoned-contact-form-7/inc/admin/template/cf7af.notification.settings.template.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/edit.php?post_type=cf7af_data&page=cf7af-setting
    • > Network (severe)
    wp-admin/edit.php?post_type=cf7af_data&page=cf7af-setting - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=cf7af-send-mail
    • > Network (severe)
    wp-admin/admin.php?page=cf7af-send-mail - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/edit.php?post_type=cf7af_data
    • > Network (severe)
    wp-admin/edit.php?post_type=cf7af_data - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: export, recover contact, wordpress, abandoned, missed contacts...

abandoned-contact-form-7/abandoned-forms-contact-form-7.php 85% from 13 tests

The primary PHP file in "Abandoned Contact Form 7" version 1.3 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("abandoned-contact-form-7.php" instead of "abandoned-forms-contact-form-7.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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 plugin1,586 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP123585721,297
JavaScript44951217
CSS213072

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity17.50
▷ Minimum class complexity1.00
▷ Maximum class complexity58.00
Average method complexity4.22
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods41
▷ Static methods12.44%
▷ Public methods41100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions114.29%
▷ Anonymous functions685.71%
Constants8
▷ Global constants8100.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
1 PNG file occupies 0.11MB with 0.06MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/editor_disable.png111.52KB46.32KB▼ 58.47%