87% katorymnd-contact-form

Code Review | Katorymnd Contact Form

WordPress plugin Katorymnd Contact Form scored 87% from 54 tests.

About plugin

  • Plugin page: katorymnd-contact...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8
  • WordPress version: 5.8.1
  • First release: Aug 19, 2020
  • Latest release: Jul 9, 2021
  • Number of updates: 14
  • Update frequency: every 23.6 days
  • Top authors: katorymnd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 186 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼147.18ms] Passed 4 tests

A check of server-side resources used by Katorymnd Contact Form
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0033.69 ▼2.25
Dashboard /wp-admin3.06 ▲0.0144.15 ▲2.94
Posts /wp-admin/edit.php3.11 ▲0.0136.22 ▼5.23
Add New Post /wp-admin/post-new.php5.42 ▼0.0185.52 ▼581.11
Media Library /wp-admin/upload.php3.00 ▲0.0031.08 ▼0.11
Katorymnd Contact Form /wp-admin/options-general.php?page=katorymnd_contact_form_settings3.0427.44

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Katorymnd Contact Form
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8816.01 ▲0.478.12 ▼2.0147.65 ▼0.38
Dashboard /wp-admin2,977 ▲435.89 ▼0.06132.83 ▼6.46111.09 ▼10.26
Posts /wp-admin/edit.php2,744 ▲52.72 ▲0.0064.62 ▼2.0891.07 ▼2.64
Add New Post /wp-admin/post-new.php1,507 ▼16318.48 ▼0.66352.70 ▼31.47105.02 ▼1.09
Media Library /wp-admin/upload.php1,815 ▲85.06 ▲0.01150.35 ▲8.55121.72 ▲1.66
Katorymnd Contact Form /wp-admin/options-general.php?page=katorymnd_contact_form_settings1,1662.0955.5280.01

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=katorymnd_contact_form_settings
    • > Notice in wp-content/plugins/katorymnd-contact-form/katorymnd_contact_form_settings_admin_page.php+9
    Undefined index: katorymnd_cfm_hidden

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
  • 2× 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/katorymnd-contact-form/katorymnd_contact_form.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/katorymnd-contact-form/katorymnd_contact_form_settings_admin_page.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 75% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
  • Requires at least: Version not formatted correctly
  • Tested up to: Version not formatted correctly
  • Requires php: Version not formatted correctly
The official readme.txt is a good inspiration

katorymnd-contact-form/katorymnd_contact_form.php 85% from 13 tests

"Katorymnd Contact Form" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("katorymnd-contact-form.php" instead of "katorymnd_contact_form.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin290 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP328421290

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected