74% mask-contact-form

Code Review | Mask Contact Form

WordPress plugin Mask Contact Form scored74%from 54 tests.

About plugin

  • Plugin page: mask-contact-form
  • Plugin version: 1.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.1
  • WordPress version: 6.3.1
  • First release: Dec 1, 2017
  • Latest release: Dec 11, 2017
  • Number of updates: 8
  • Update frequency: every 1.5 days
  • Top authors: marcusfsilva (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,015 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼1.93MB] [CPU: ▼48.17ms] Passed 4 tests

A check of server-side resources used by Mask Contact Form
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.405.64 ▼31.92
Dashboard /wp-admin2.08 ▼1.225.64 ▼39.11
Posts /wp-admin/edit.php2.08 ▼1.285.90 ▼41.45
Add New Post /wp-admin/post-new.php2.08 ▼3.816.30 ▼80.21
Media Library /wp-admin/upload.php2.08 ▼1.155.42 ▼27.48

Server storage [IO: ▲0.03MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Mask Contact Form
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲16313.64 ▼0.536.85 ▲5.1238.43 ▼4.59
Dashboard /wp-admin2,203 ▲155.85 ▲0.9796.81 ▼17.6439.54 ▼1.78
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0339.64 ▼0.8936.08 ▼0.30
Add New Post /wp-admin/post-new.php1,514 ▼1417.40 ▼0.89642.41 ▲48.9458.60 ▲0.67
Media Library /wp-admin/upload.php1,391 ▲34.18 ▼0.1496.45 ▲2.9244.14 ▲1.58

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method CRT_Mask_Input::init() should not be called statically
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

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

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mask-contact-form/index.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid url: "Marcus"
You can look at the official readme.txt

mask-contact-form/index.php 92% from 13 tests

"Mask Contact Form" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("mask-contact-form.php" instead of "index.php")

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
Success! There were no dangerous files found in this plugin502 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript27960486
PHP181116

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin