94% formtoemail-shortcodes

Code Review | FormToEmail Shortcodes

WordPress plugin FormToEmail Shortcodes scored 94% from 54 tests.

About plugin

  • Plugin page: formtoemail-short...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-5.3
  • WordPress version: 5.9.2
  • First release: Feb 22, 2017
  • Latest release: Dec 6, 2019
  • Number of updates: 8
  • Update frequency: every 126.9 days
  • Top authors: formtoemail (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 614 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

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

Server-side resources used by FormToEmail Shortcodes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0556.64 ▲0.37
Dashboard /wp-admin3.45 ▲0.0473.16 ▲40.08
Posts /wp-admin/edit.php3.68 ▲0.0435.90 ▼2.15
Add New Post /wp-admin/post-new.php6.92 ▼0.0593.69 ▼1,202.23
Media Library /wp-admin/upload.php3.33 ▲0.0466.81 ▲43.31

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for FormToEmail Shortcodes
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,783 ▲2515.91 ▲0.296.46 ▲0.692.38 ▼0.22
Dashboard /wp-admin2,912 ▲616.16 ▲0.02115.91 ▼19.18158.71 ▼84.97
Posts /wp-admin/edit.php2,704 ▲163.05 ▼0.1889.61 ▲21.32161.41 ▲16.74
Add New Post /wp-admin/post-new.php1,675 ▲1418.19 ▲2.17425.17 ▼25.55165.69 ▲2.10
Media Library /wp-admin/upload.php1,718 ▲245.49 ▼0.02136.39 ▼47.17192.18 ▼9.06

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
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 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/formtoemail-shortcodes/shortcodes.php:10

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 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: web forms, forms to email, forms, formtoemail, email form...

formtoemail-shortcodes/shortcodes.php 92% from 13 tests

The principal PHP file in "FormToEmail Shortcodes" v. 1.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("formtoemail-shortcodes.php" instead of "shortcodes.php")

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
Good job! No executable or dangerous file extensions detected325 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP14411219
CSS14070
JavaScript26136

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
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%
Functions5
▷ Named functions5100.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
logo.png2.94KB2.07KB▼ 29.73%