84% ajaxify-contact-form

Code Review | Awesome Contact Form

WordPress plugin Awesome Contact Form scored 84% from 54 tests.

About plugin

  • Plugin page: ajaxify-contact-form
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.7
  • WordPress version: 6.3.1
  • First release: Nov 5, 2013
  • Latest release: Nov 8, 2013
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: volgodark (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 1,571 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▲0.84ms] Passed 4 tests

Server-side resources used by Awesome Contact Form
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0738.06 ▲4.78
Dashboard /wp-admin3.32 ▲0.0144.21 ▼1.34
Posts /wp-admin/edit.php3.37 ▲0.0149.87 ▲4.08
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.98 ▼4.17
Media Library /wp-admin/upload.php3.24 ▲0.0140.81 ▲8.98

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 36 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Awesome Contact Form: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲11613.73 ▼0.702.04 ▲0.3940.45 ▼5.31
Dashboard /wp-admin2,207 ▼25.87 ▲0.0395.53 ▼10.0340.18 ▲0.77
Posts /wp-admin/edit.php2,090 ▲12.03 ▲0.0234.81 ▼4.4033.70 ▼0.36
Add New Post /wp-admin/post-new.php1,536 ▼623.23 ▼0.13661.77 ▼4.0147.45 ▼24.39
Media Library /wp-admin/upload.php1,395 ▲104.18 ▼0.0494.32 ▼7.0238.96 ▼7.04

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin has failed uninstalling correctly, leaving 36 files (0.79MB) in the plugin directory
    • (new file) css/reset.css
    • (new file) css/ui-lightness/images/animated-overlay.gif
    • (new file) css/style-front.css
    • (new file) css/admin.css
    • (new file) css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png
    • (new file) css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png
    • (new file) core/admin.php
    • (new file) core/index.php
    • (new file) ajax-contact-form.php
    • (new file) core/defaults.php
    • ...

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 | 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 fix the following items
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/ajaxify-contact-form/ajax-contact-form.php:43
    • > PHP Warning
      Use of undefined constant ACF_WP_VERSION - assumed 'ACF_WP_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/ajaxify-contact-form/core/index.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/ajaxify-contact-form/front/build.php:7
    • > PHP Notice
      Undefined variable: acf_core_loader in wp-content/plugins/ajaxify-contact-form/core/index.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ajaxify-contact-form/core/index.php:15
    • > PHP Notice
      Trying to get property 'settings' of non-object in wp-content/plugins/ajaxify-contact-form/front/build.php on line 6
    • > PHP Notice
      Trying to get property 'settings' of non-object in wp-content/plugins/ajaxify-contact-form/core/index.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: contact form, ajax contact form, feedback, feedback form, contacts

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

This is the main PHP file of "Awesome Contact Form" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ajaxify-contact-form.php" instead of "ajax-contact-form.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,382 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity7.00
▷ Minimum class complexity4.00
▷ Maximum class complexity9.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
22 PNG files occupy 0.73MB with 0.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/stamp/stamp.png5.17KB2.87KB▼ 44.58%
css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png0.26KB0.12KB▼ 53.44%
css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png0.20KB0.08KB▼ 57.56%
css/ui-lightness/images/ui-icons_ef8c08_256x240.png4.44KB4.17KB▼ 6.02%