78% abandoned-contact-form-7

Code Review | Abandoned Contact Form 7

WordPress plugin Abandoned Contact Form 7 scored78%from 54 tests.

About plugin

  • Plugin page: abandoned-contact...
  • Plugin version: 1.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3
  • WordPress version: 6.3.1
  • First release: Sep 17, 2020
  • Latest release: Aug 11, 2023
  • Number of updates: 32
  • Update frequency: every 33.1 days
  • Top authors: zealopensource (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active /1,760 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by Abandoned Contact Form 7
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.79 ▼2.42
Dashboard /wp-admin3.31 ▲0.0045.71 ▼1.10
Posts /wp-admin/edit.php3.36 ▲0.0045.08 ▼5.30
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.34 ▲4.93
Media Library /wp-admin/upload.php3.23 ▲0.0035.92 ▲1.92
All Abandoned Users /wp-admin/edit.php?post_type=cf7af_data3.0423.34
Send Mail /wp-admin/admin.php?page=cf7af-send-mail3.0018.56
Mail Notification Settings /wp-admin/edit.php?post_type=cf7af_data&page=cf7af-setting3.0022.94

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
cf7af_mail_notify_option
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Abandoned Contact Form 7
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.74 ▲0.361.81 ▲0.1446.69 ▲1.96
Dashboard /wp-admin2,206 ▲184.86 ▼0.02112.61 ▼6.7442.63 ▼1.93
Posts /wp-admin/edit.php2,089 ▲32.02 ▲0.0337.92 ▲0.9233.78 ▼1.24
Add New Post /wp-admin/post-new.php1,533 ▲1923.16 ▲5.58669.87 ▼23.9053.51 ▼3.32
Media Library /wp-admin/upload.php1,391 ▼04.19 ▼0.0496.71 ▼7.7843.48 ▼2.50
All Abandoned Users /wp-admin/edit.php?post_type=cf7af_data280.440.064.07
Send Mail /wp-admin/admin.php?page=cf7af-send-mail280.440.083.32
Mail Notification Settings /wp-admin/edit.php?post_type=cf7af_data&page=cf7af-setting280.440.083.74

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • cf7af_mail_notify_option

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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 take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > 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
    • > 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

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > 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)
    • > 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&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)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: email, wordpress, recover contact, missed contacts, export...

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

This is the main PHP file of "Abandoned Contact Form 7" version 1.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("abandoned-contact-form-7.php" instead of "abandoned-forms-contact-form-7.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin1,668 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP123665761,369
JavaScript45051227
CSS213072

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity19.12
▷ Minimum class complexity1.00
▷ Maximum class complexity66.00
Average method complexity4.54
▷ Minimum method complexity1.00
▷ Maximum method complexity40.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%