84% ap-contact-form

Code Review | Easiest Contact Form for WordPress - AP Contact Form

WordPress plugin Easiest Contact Form for WordPress - AP Contact Form scored 84% from 54 tests.

About plugin

  • Plugin page: ap-contact-form
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 5.8.1
  • First release: Oct 27, 2016
  • Latest release: Sep 30, 2021
  • Number of updates: 27
  • Update frequency: every 66.6 days
  • Top authors: Access Keys (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 7,408 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.03MB] [CPU: ▼197.16ms] Passed 4 tests

This is a short check of server-side resources used by Easiest Contact Form for WordPress - AP Contact Form
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1531.69 ▲11.91
Dashboard /wp-admin3.09 ▲0.0233.50 ▼5.01
Posts /wp-admin/edit.php3.17 ▲0.0631.20 ▲0.11
Add New Post /wp-admin/post-new.php5.45 ▲0.0168.03 ▼781.17
Media Library /wp-admin/upload.php3.03 ▲0.0321.50 ▼2.56

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 2 new options
New WordPress options
ap_contact_form_settings
widget_apcf_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easiest Contact Form for WordPress - AP Contact Form
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,854 ▲25316.01 ▼0.019.81 ▲4.7681.79 ▲2.96
Dashboard /wp-admin2,956 ▲636.24 ▲0.09116.09 ▼14.50170.95 ▲2.09
Posts /wp-admin/edit.php2,764 ▲583.24 ▼0.0162.67 ▼4.76133.27 ▼9.78
Add New Post /wp-admin/post-new.php2,091 ▼1,65216.19 ▼2.99384.23 ▼82.62161.00 ▼12.43
Media Library /wp-admin/upload.php1,781 ▲295.55 ▲0.05142.92 ▼6.88183.69 ▼1.09

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 2 options
    • widget_apcf_widget
    • ap_contact_form_settings

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
  • 6× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ap-contact-form/inc/backend/settings.php
    • > /wp-content/plugins/ap-contact-form/inc/frontend/shortcode.php
    • > /wp-content/plugins/ap-contact-form/inc/backend/widget.php
    • > /wp-content/plugins/ap-contact-form/inc/backend/apcf-about.php
    • > /wp-content/plugins/ap-contact-form/inc/backend/how-to.php
    • > /wp-content/plugins/ap-contact-form/ap-contact-form.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
10 plugin tags: email form, enquiry forms, lead form, form, contact forms...

ap-contact-form/ap-contact-form.php Passed 13 tests

The entry point to "Easiest Contact Form for WordPress - AP Contact Form" version 1.0.7 is a PHP file that has certain tags in its header comment area
43 characters long description:
A simple contact form plugin by Accesspress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin2,026 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP710463765
SVG100685
CSS31524253
PO File15763193
JavaScript21819130

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity20.00
▷ Minimum class complexity4.00
▷ Maximum class complexity36.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
4 PNG files occupy 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/customize.png24.05KB8.41KB▼ 65.05%
images/plugin.png12.50KB5.31KB▼ 57.50%
images/theme.png52.01KB17.38KB▼ 66.59%
images/select_arrow.png0.17KB0.21KB0.00%