84% add-sweetalert-to-elementor-form

Code Review | Add SweetAlert to Elementor Form

WordPress plugin Add SweetAlert to Elementor Form scored84%from 54 tests.

About plugin

  • Plugin page: add-sweetalert-to...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: May 21, 2023
  • Latest release: May 21, 2023
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: leonardohumbert (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /123 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Add SweetAlert to Elementor Form
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.94 ▼0.24
Dashboard /wp-admin3.31 ▲0.0149.57 ▼0.66
Posts /wp-admin/edit.php3.36 ▲0.0047.13 ▼3.43
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.25 ▼14.69
Media Library /wp-admin/upload.php3.23 ▲0.0034.69 ▼5.58

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Add SweetAlert to Elementor Form
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲6713.35 ▼1.036.38 ▲4.3442.25 ▲0.51
Dashboard /wp-admin2,221 ▲215.87 ▲0.05110.60 ▲7.6945.34 ▲3.44
Posts /wp-admin/edit.php2,097 ▼31.97 ▼0.0235.21 ▼3.1635.30 ▼1.41
Add New Post /wp-admin/post-new.php1,554 ▲818.44 ▼4.76645.64 ▼58.7651.43 ▼8.92
Media Library /wp-admin/upload.php1,400 ▼04.23 ▲0.0699.33 ▼1.5546.56 ▲1.70

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-sweetalert-to-elementor-form/add-sweetalert-to-elementor-form.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

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
10 plugin tags: elementor addon, elements, addons, elementor extensions, elementor...

add-sweetalert-to-elementor-form/add-sweetalert-to-elementor-form.php Passed 13 tests

The main file in "Add SweetAlert to Elementor Form" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
98 characters long description:
Replaces the default Elementor Form message display after submission with the SweetAlert2 default.

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
Good job! No executable or dangerous file extensions detected60 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript22027
CSS20025
PHP14118

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.18MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png185.30KB111.06KB▼ 40.07%