94% mailster-contact-form-7

Code Review | Mailster Contact Form 7

WordPress plugin Mailster Contact Form 7 scored 94% from 54 tests.

About plugin

  • Plugin page: mailster-contact-...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.9
  • WordPress version: 5.9.2
  • First release: Jan 13, 2017
  • Latest release: Jan 28, 2022
  • Number of updates: 55
  • Update frequency: every 33.5 days
  • Top authors: everpress (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

2,000+ active / 17,159 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

Server-side resources used by Mailster Contact Form 7
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0557.18 ▲3.62
Dashboard /wp-admin3.46 ▲0.0631.47 ▼3.14
Posts /wp-admin/edit.php3.69 ▲0.0535.42 ▼2.41
Add New Post /wp-admin/post-new.php6.92 ▼0.0589.64 ▼1,180.24
Media Library /wp-admin/upload.php3.34 ▲0.0423.44 ▼0.76

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Mailster Contact Form 7
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4115.86 ▲0.125.89 ▼0.382.96 ▲0.42
Dashboard /wp-admin2,885 ▲246.16 ▼0.02121.74 ▼14.80158.21 ▼11.13
Posts /wp-admin/edit.php2,691 ▲33.24 ▲0.0062.73 ▼1.38138.75 ▼4.02
Add New Post /wp-admin/post-new.php1,618 ▼4319.93 ▲4.37380.47 ▼11.06163.25 ▲4.75
Media Library /wp-admin/upload.php1,701 ▲65.54 ▲0.02141.00 ▲2.23185.14 ▼0.95

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 completely, with no zombie files or tables

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/mailster-contact-form-7/classes/contactform.class.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_parse_args() in wp-content/plugins/mailster-contact-form-7/views/editorpanel.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: signup form, mailster, contact form 7, newsletter

mailster-contact-form-7/mailster-contact-form-7.php 92% from 13 tests

The principal PHP file in "Mailster Contact Form 7" v. 1.5 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected313 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP310376292
JavaScript27014
CSS2007

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin