84% pirate-forms

Code Review | Contact Form & SMTP Plugin for WordPress by PirateForms

WordPress plugin Contact Form & SMTP Plugin for WordPress by PirateForms scored84%from 54 tests.

About plugin

  • Plugin page: pirate-forms
  • Plugin version: 2.5.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Sep 23, 2015
  • Latest release: Jul 26, 2019
  • Number of updates: 92
  • Update frequency: every 15.3 days
  • Top authors: codeinwp (88.04%)themeisle (8.7%)jaredatch (5.43%)

Code review

54 tests

User reviews

223 reviews

Install metrics

60,000+ active /3,714,966 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
Installer ran successfully

Server metrics [RAM: ▼0.59MB] [CPU: ▼16.00ms] Passed 4 tests

This is a short check of server-side resources used by Contact Form & SMTP Plugin for WordPress by PirateForms
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1041.18 ▲1.96
Dashboard /wp-admin3.39 ▲0.0947.18 ▼2.66
Posts /wp-admin/edit.php3.44 ▲0.0956.17 ▲11.42
Add New Post /wp-admin/post-new.php3.27 ▼2.6236.66 ▼61.66
Media Library /wp-admin/upload.php3.31 ▲0.0936.08 ▼1.65
Migration /wp-admin/admin.php?page=pirateforms-admin-migration3.3333.26
Settings /wp-admin/admin.php?page=pirateforms-admin3.5840.61
All Entries /wp-admin/edit.php?post_type=pf_contact3.3635.95

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 107 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_pirate_forms_contact_widget
widget_theysaidso_widget
widget_recent-posts
db_upgraded
pirate_forms_settings_array
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Contact Form & SMTP Plugin for WordPress by PirateForms
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,040 ▲29413.58 ▼0.806.32 ▲4.6340.08 ▼5.63
Dashboard /wp-admin2,325 ▲1365.89 ▲1.0298.91 ▼22.1379.53 ▲31.38
Posts /wp-admin/edit.php2,121 ▲322.06 ▲0.0437.15 ▲1.2338.09 ▲7.11
Add New Post /wp-admin/post-new.php6,485 ▲4,97123.32 ▲5.65990.62 ▲318.9143.12 ▼10.79
Media Library /wp-admin/upload.php1,417 ▲264.28 ▲0.07102.07 ▲2.0546.68 ▲1.71
Migration /wp-admin/admin.php?page=pirateforms-admin-migration8762.0727.7838.21
Settings /wp-admin/admin.php?page=pirateforms-admin2,3037.78182.6458.86
All Entries /wp-admin/edit.php?post_type=pf_contact1,0762.1243.0229.02

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: 7 options
    • widget_recent-comments
    • widget_pirate_forms_contact_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Please take a closer look at the following
  • 39× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: wrap_classes in wp-content/plugins/pirate-forms/public/partials/fields/number.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/pirate-forms/admin/partials/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Autoload\\AutoloadGenerator' not found in wp-content/plugins/pirate-forms/vendor/xrstf/composer-php52/lib/xrstf/Composer52/AutoloadGenerator.php:30
    • > PHP Notice
      Undefined variable: wrap_classes in wp-content/plugins/pirate-forms/public/partials/fields/checkbox.php on line 14
    • > PHP Notice
      Undefined variable: wrap_classes in wp-content/plugins/pirate-forms/public/partials/fields/email.php on line 14
    • > PHP Notice
      Undefined variable: name in wp-content/plugins/pirate-forms/public/partials/fields/text.php on line 18
    • > PHP Notice
      Undefined variable: name in wp-content/plugins/pirate-forms/public/partials/fields/tel.php on line 18
    • > PHP Notice
      Undefined variable: name in wp-content/plugins/pirate-forms/public/partials/fields/number.php on line 18
    • > PHP Notice
      Undefined variable: wrap_classes in wp-content/plugins/pirate-forms/public/partials/fields/text.php on line 14
    • > PHP Notice
      Undefined variable: name in wp-content/plugins/pirate-forms/public/partials/fields/textarea.php on line 17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (Screenshot 1. How to use contact form in posts/pages), #2 (Screenshot 2. How to customize contact form labels), #3 (Screenshot 3. How to use reCaptcha), #4 (Screenshot 4. Enabling SMTP)
You can take inspiration from this readme.txt

pirate-forms/pirate-forms.php Passed 13 tests

The entry point to "Contact Form & SMTP Plugin for WordPress by PirateForms" version 2.5.2 is a PHP file that has certain tags in its header comment area
67 characters long description:
Easily creates a nice looking, simple contact form on your WP site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin10,599 lines of code in 83 files:
LanguageFilesBlank linesComment linesLines of code
PHP581,3082,8087,835
JavaScript7108109746
PO File3318423683
CSS51033609
Markdown43030527
JSON300125
XML25045
YAML12129

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity27.17
▷ Minimum class complexity1.00
▷ Maximum class complexity236.00
Average method complexity3.55
▷ Minimum method complexity1.00
▷ Maximum method complexity75.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes35
▷ Abstract classes25.71%
▷ Concrete classes3394.29%
▷ Final classes26.06%
Methods360
▷ Static methods298.06%
▷ Public methods28278.33%
▷ Protected methods133.61%
▷ Private methods6518.06%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants24
▷ Global constants1145.83%
▷ Class constants1354.17%
▷ Public constants13100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.24MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/wpforms-builder.png89.37KB31.40KB▼ 64.86%
screenshot-4.png23.06KB9.18KB▼ 60.19%
screenshot-1.png38.46KB14.83KB▼ 61.43%
(invalid) admin/css/icon-128x128.png7.25KB0.00KB▼ 100.00%
admin/img/wpforms-migration.png32.74KB11.68KB▼ 64.31%