94% ai-contact-us

Code Review | AI Contact Us Form

WordPress plugin AI Contact Us Form scored 94% from 53 tests.

About plugin

  • Plugin page: ai-contact-us
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-4.9.7
  • WordPress version: 5.8.1
  • First release: Jul 11, 2018
  • Latest release: Aug 24, 2018
  • Number of updates: 43
  • Update frequency: every 1.0 days
  • Top authors: kariarora7 (100%)

Code review

53 tests

User reviews

2 reviews

Install metrics

10+ active / 472 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼270.37ms] Passed 4 tests

Analyzing server-side resources used by AI Contact Us Form
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.1636.24 ▲15.61
Dashboard /wp-admin3.10 ▲0.0541.50 ▼2.00
Posts /wp-admin/edit.php3.15 ▲0.0442.87 ▲0.11
Add New Post /wp-admin/post-new.php5.46 ▲0.0391.73 ▼1,076.00
Media Library /wp-admin/upload.php3.04 ▲0.0331.98 ▼3.58

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

AI Contact Us Form: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,865 ▲25916.67 ▲1.0514.44 ▲5.3550.41 ▲3.70
Dashboard /wp-admin2,979 ▲1295.93 ▲0.07135.83 ▲6.1799.69 ▼9.86
Posts /wp-admin/edit.php2,726 ▲202.69 ▲0.0163.59 ▼5.4395.89 ▲3.46
Add New Post /wp-admin/post-new.php1,666 ▼37218.77 ▼0.35355.60 ▼3.83110.14 ▲7.28
Media Library /wp-admin/upload.php1,792 ▲205.01 ▲0.01147.35 ▼12.26112.50 ▼7.80

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ai-contact-us/contactus.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention: The official readme.txt is a good inspiration

ai-contact-us/contactus.php 92% from 13 tests

"AI Contact Us Form" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("ai-contact-us.php" instead of "contactus.php")

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
Everything looks great! No dangerous files found in this plugin552 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS128351
PHP22819178
JavaScript11023

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/boy.png28.31KB12.05KB▼ 57.42%