84% addon-sweetalert-contact-form-7

Code Review | Add-on SweetAlert Contact Form 7

WordPress plugin Add-on SweetAlert Contact Form 7 scored84%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: 6.3.1
  • 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

100+ active /2,162 total downloads

Benchmarks

Plugin footprint 83% from 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.01MB] [CPU: ▼9.86ms] Passed 4 tests

An overview of server-side resources used by Add-on SweetAlert Contact Form 7
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.30 ▼0.30
Dashboard /wp-admin3.31 ▼0.0450.84 ▼10.74
Posts /wp-admin/edit.php3.36 ▲0.0046.24 ▼8.45
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.19 ▼19.96
Media Library /wp-admin/upload.php3.23 ▲0.0040.48 ▲2.90
SweetAlert2 for CF7 /wp-admin/admin.php?page=sweetalert-cf73.0024.25

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Add-on SweetAlert Contact Form 7
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.28 ▼0.072.26 ▲0.7043.94 ▼1.92
Dashboard /wp-admin2,198 ▲215.62 ▼0.0696.94 ▲6.6741.86 ▼6.85
Posts /wp-admin/edit.php2,097 ▼32.03 ▲0.0234.30 ▼7.7434.19 ▼7.71
Add New Post /wp-admin/post-new.php1,526 ▼022.03 ▼0.97684.78 ▲61.1754.07 ▲6.66
Media Library /wp-admin/upload.php1,403 ▼04.21 ▼0.17104.43 ▼0.4646.71 ▲1.91
SweetAlert2 for CF7 /wp-admin/admin.php?page=sweetalert-cf7280.420.083.94

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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 just a short smoke test looking for browser issues
Please fix the following browser errors
    • > 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)

Optimizations

Plugin configuration Passed 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
5 plugin tags: contact form 7, sweetalert2, sweet alert, cf7, contact form

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

The main PHP script in "Add-on SweetAlert Contact Form 7" version 1.1.1 is automatically included on every request by WordPress
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 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin236 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP32629232
JavaScript3003
CSS1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin