94% addon-sweetalert-contact-form-7

Code Review | Add-on SweetAlert Contact Form 7

WordPress plugin Add-on SweetAlert Contact Form 7 scored 94% from 54 tests.

About plugin

  • Plugin page: addon-sweetalert-...
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Apr 7, 2020
  • Latest release: Aug 2, 2020
  • Number of updates: 30
  • Update frequency: every 3.9 days
  • Top authors: camilo517 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active / 1,609 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.02MB] [CPU: ▼292.36ms] Passed 4 tests

An overview of server-side resources used by Add-on SweetAlert Contact Form 7
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0156.51 ▲7.60
Dashboard /wp-admin3.41 ▲0.0035.31 ▲0.11
Posts /wp-admin/edit.php3.65 ▲0.0039.35 ▲1.75
Add New Post /wp-admin/post-new.php6.88 ▼0.0998.41 ▼1,172.14
Media Library /wp-admin/upload.php3.30 ▲0.0025.19 ▲0.83
SweetAlert2 for CF7 /wp-admin/admin.php?page=sweetalert-cf73.1021.20

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Add-on SweetAlert Contact Form 7
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲7316.17 ▲0.556.62 ▼0.182.84 ▼0.28
Dashboard /wp-admin2,892 ▲416.13 ▲0.03120.55 ▼23.67160.66 ▼2.61
Posts /wp-admin/edit.php2,691 ▼03.23 ▲0.0061.01 ▼2.38140.81 ▼3.29
Add New Post /wp-admin/post-new.php1,752 ▲9121.85 ▲6.19460.44 ▲28.56164.36 ▲2.55
Media Library /wp-admin/upload.php1,695 ▼65.54 ▲0.01138.02 ▼0.01189.76 ▼10.01
SweetAlert2 for CF7 /wp-admin/admin.php?page=sweetalert-cf7280.940.0419.22

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

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)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=sweetalert-cf7
    • > Network (severe)
    wp-admin/admin.php?page=sweetalert-cf7 - Failed to load resource: the server responded with a status of 403 (Forbidden)


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: sweet alert, contact form, contact form 7, cf7, sweetalert2

addon-sweetalert-contact-form-7/addon-sweetalert-contact-form-7.php Passed 13 tests

The primary PHP file in "Add-on SweetAlert Contact Form 7" version 1.1.1 is used by WordPress to initiate all plugin functionality
60 characters long description:
Add SweetAlert2 script in Contact Form 7 submission process.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin236 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions13100.00%
▷ Anonymous functions00.00%
▷ 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
No PNG files were detected