84% answering-contact-form

Code Review | Answering Contact Form

WordPress plugin Answering Contact Form scored84%from 54 tests.

About plugin

  • Plugin page: answering-contact...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.4
  • WordPress version: 6.3.1
  • First release: Nov 12, 2015
  • Latest release: Dec 18, 2015
  • Number of updates: 10
  • Update frequency: every 3.8 days
  • Top authors: devmatte (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /2,776 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼2.77ms] Passed 4 tests

Server-side resources used by Answering Contact Form
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0838.52 ▼8.07
Dashboard /wp-admin3.39 ▲0.0949.30 ▼3.82
Posts /wp-admin/edit.php3.44 ▲0.0855.19 ▲5.89
Add New Post /wp-admin/post-new.php5.97 ▲0.08109.65 ▼4.62
Media Library /wp-admin/upload.php3.31 ▲0.0840.81 ▲5.44
Answers /wp-admin/edit.php?post_type=answer3.3540.77
Settings /wp-admin/admin.php?page=afcl_settings_options3.2836.66

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Answering Contact Form
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲14513.88 ▼0.398.56 ▲6.7341.29 ▼3.55
Dashboard /wp-admin2,229 ▲495.64 ▼0.0293.13 ▼8.9742.53 ▼3.21
Posts /wp-admin/edit.php2,131 ▲312.02 ▲0.0338.78 ▲2.1336.44 ▼1.31
Add New Post /wp-admin/post-new.php1,552 ▲2623.45 ▼0.24655.33 ▼18.7150.01 ▼9.06
Media Library /wp-admin/upload.php1,434 ▲374.23 ▲0.02100.30 ▼2.0445.56 ▼2.70
Answers /wp-admin/edit.php?post_type=answer1,0951.9530.6335.20
Settings /wp-admin/admin.php?page=afcl_settings_options9902.1522.6829.33

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: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/answering-contact-form/settings/acf_settings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/answering-contact-form/includes/acf_shortcode.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/answering-contact-form/answering_contact_form.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/answering-contact-form/includes/acf_answers.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/answering-contact-form/includes/acf_help_text.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 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
4 plugin tags: instant answers, answering contact form, jquery, contact form

answering-contact-form/answering_contact_form.php 85% from 13 tests

The entry point to "Answering Contact Form" version 1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("answering-contact-form.php" instead of "answering_contact_form.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 182 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected420 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP66454276
CSS2190128
JavaScript15016

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/acfl-toggle-minus.png14.19KB0.10KB▼ 99.28%
css/images/acfl-toggle-plus.png1.01KB0.10KB▼ 89.62%