83% kento-ajax-contact-form

Code Review | Kento Ajax Contact Form

WordPress plugin Kento Ajax Contact Form scored83%from 54 tests.

About plugin

  • Plugin page: kento-ajax-contac...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.6.1
  • WordPress version: 6.3.1
  • First release: Jan 8, 2014
  • Latest release: Nov 24, 2016
  • Number of updates: 6
  • Update frequency: every 175.3 days
  • Top authors: kentothemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /3,260 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Server-side resources used by Kento Ajax Contact Form
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.17 ▼0.47
Dashboard /wp-admin3.31 ▲0.0148.44 ▲0.98
Posts /wp-admin/edit.php3.36 ▲0.0044.37 ▼1.42
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.54 ▼4.34
Media Library /wp-admin/upload.php3.23 ▲0.0036.86 ▲1.64

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Kento Ajax Contact Form
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,911 ▲16513.59 ▼0.655.91 ▲4.2343.47 ▲1.37
Dashboard /wp-admin2,206 ▲235.80 ▲0.8699.61 ▼7.3439.05 ▼1.71
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0536.16 ▼0.7334.75 ▼2.25
Add New Post /wp-admin/post-new.php1,535 ▼223.17 ▼0.06599.65 ▼73.0052.98 ▲0.48
Media Library /wp-admin/upload.php1,382 ▼64.14 ▼0.0795.71 ▼15.9141.77 ▼4.95

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

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
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/kento-ajax-contact-form/index.php:13
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/kento-ajax-contact-form/index.php on line 13

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Normal view.), #2 (Ivalid Email Address.), #3 (Blank Text Field Error.)
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
The official readme.txt is a good inspiration

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

The main file in "Kento Ajax Contact Form" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("kento-ajax-contact-form.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin122 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS13063
PHP1211158
JavaScript1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.06
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png30.69KB16.83KB▼ 45.18%
screenshot-1.png26.07KB14.21KB▼ 45.50%
screenshot-2.png28.98KB15.70KB▼ 45.85%