10% allpost-contactform

Code Review | All Post Contact Form

WordPress plugin All Post Contact Form scored10%from 54 tests.

About plugin

  • Plugin page: allpost-contactform
  • Plugin version: 1.5.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.3-6.4.1
  • WordPress version: 6.3.1
  • First release: Apr 14, 2017
  • Latest release: Nov 14, 2023
  • Number of updates: 262
  • Update frequency: every 9.2 days
  • Top authors: rainbowlinkinc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,067 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/allpost-contactform/allpost-contactform-language.php+7
    Undefined index: HTTP_ACCEPT_LANGUAGE

Server metrics [RAM: ▼1.90MB] [CPU: ▼53.68ms] Passed 4 tests

An overview of server-side resources used by All Post Contact Form
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.375.29 ▼35.14
Dashboard /wp-admin2.12 ▼1.197.05 ▼46.76
Posts /wp-admin/edit.php2.12 ▼1.258.33 ▼39.55
Add New Post /wp-admin/post-new.php2.12 ▼3.786.28 ▼93.25
Media Library /wp-admin/upload.php2.12 ▼1.125.70 ▼30.82
Contact Form /wp-admin/options-general.php?page=allpost-contactform/allpost-contactform.php2.126.38

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 42 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
allpost_contactform_options
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by All Post Contact Form
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6314.35 ▲0.211.93 ▲0.1439.65 ▼6.68
Dashboard /wp-admin2,201 ▲205.57 ▼0.1586.29 ▼16.5538.12 ▲0.57
Posts /wp-admin/edit.php2,106 ▲62.01 ▼0.0037.79 ▼0.7735.33 ▼1.10
Add New Post /wp-admin/post-new.php1,531 ▼523.18 ▼0.16629.86 ▼22.9446.17 ▼8.99
Media Library /wp-admin/upload.php1,406 ▲94.18 ▲0.00102.80 ▲2.7542.77 ▲2.09
Contact Form /wp-admin/options-general.php?page=allpost-contactform/allpost-contactform.php1,0812.0024.1746.25

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/allpost-contactform/allpost-contactform-language.php+7
    Undefined index: HTTP_ACCEPT_LANGUAGE
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • allpost_contactform_options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 63 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=allpost-contactform/allpost-contactform.php
    • > Notice in wp-content/plugins/allpost-contactform/allpost-contactform-language.php+11
    Undefined index: HTTP_ACCEPT_LANGUAGE

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/allpost-contactform/rl-apcf-admin-ar.php
    • > /wp-content/plugins/allpost-contactform/rl-apcf-admin-zh.php
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/allpost-contactform/allpost-contactform-core.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/allpost-contactform/allpost-contactform-language.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/allpost-contactform/assets/header_apcf.php:7
    • > PHP Notice
      Undefined variable: key in wp-content/plugins/allpost-contactform/allpost-contactform-str_replace.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/allpost-contactform/assets/apcf_template.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/allpost-contactform/allpost-contactform-admin-ui.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/allpost-contactform/allpost-contactform-admin-view.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/allpost-contactform/assets/apcf_template_ja.php:6
    • > PHP Notice
      Undefined variable: value in wp-content/plugins/allpost-contactform/allpost-contactform-str_replace.php on line 16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: These screenshots require images: #15 (screenshot-15.png: Added the function to add multiple subjects to one form.), #16 (screenshot-16.png: 「一つのフォームに複数の件名を付けた」ところ), #13 (screenshot-13.png: Added a function of receiving an attachment file to screenshot-3.png), #14 (screenshot-14.png: screenshot-8.pngに添付ファイル受信機能を追加したところ)
The official readme.txt might help

allpost-contactform/allpost-contactform.php 85% from 13 tests

The primary PHP file in "All Post Contact Form" version 1.5.5 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 172 characters long)
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,135 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP18125184884
CSS2949247
JavaScript223674

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity1.75
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.09
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods35
▷ Static methods514.29%
▷ Public methods35100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.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
18 PNG files occupy 2.97MB with 1.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png218.78KB71.38KB▼ 67.37%
assets/screenshot-14.png79.24KB79.27KB0.00%
assets/banner-1544x500.png730.67KB257.63KB▼ 64.74%
assets/icon-128x128.png57.04KB16.77KB▼ 70.60%
assets/screenshot-4.png90.79KB90.79KB0.00%