72% pcf-contact-form

Code Review | PCF Contact Form

WordPress plugin PCF Contact Form scored72%from 54 tests.

About plugin

  • Plugin page: pcf-contact-form
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.3.1
  • WordPress version: 6.3.1
  • First release: Sep 22, 2015
  • Latest release: Oct 27, 2015
  • Number of updates: 25
  • Update frequency: every 5.0 days
  • Top authors: PCFDev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /966 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.90ms] Passed 4 tests

An overview of server-side resources used by PCF Contact Form
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.20 ▼3.07
Dashboard /wp-admin3.37 ▲0.0748.49 ▼3.12
Posts /wp-admin/edit.php3.49 ▲0.1348.68 ▼0.77
Add New Post /wp-admin/post-new.php5.95 ▲0.0794.96 ▼4.62
Media Library /wp-admin/upload.php3.30 ▲0.0742.46 ▲4.71
Contact Form /wp-admin/admin.php?page=pcfcf-plugin3.2434.19
Form Submissions /wp-admin/admin.php?page=pcfcf-plugin-submissions3.2639.05
SQL Options /wp-admin/admin.php?page=pcfcf-plugin-sql3.2432.81

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for PCF Contact Form
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.20 ▼1.181.66 ▼0.1640.46 ▼7.43
Dashboard /wp-admin2,236 ▲484.85 ▼0.04111.56 ▼6.1142.96 ▼0.97
Posts /wp-admin/edit.php2,116 ▲272.06 ▲0.0639.66 ▲1.8535.47 ▲2.22
Add New Post /wp-admin/post-new.php1,555 ▲1323.28 ▲0.31666.37 ▼24.4454.32 ▼12.82
Media Library /wp-admin/upload.php1,415 ▲274.20 ▲0.0797.81 ▼19.1143.82 ▼5.18
Contact Form /wp-admin/admin.php?page=pcfcf-plugin8422.0624.0729.50
Form Submissions /wp-admin/admin.php?page=pcfcf-plugin-submissions7992.0224.7225.51
SQL Options /wp-admin/admin.php?page=pcfcf-plugin-sql8762.0622.1028.76

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=pcfcf-plugin-sql
    • > Notice in wp-content/plugins/pcf-contact-form/core/pcfcf-options.php+252
    Undefined variable: args
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=pcfcf-plugin-sql
    • > Notice in wp-content/plugins/pcf-contact-form/core/pcfcf-options.php+252
    Trying to access array offset on value of type null

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/pcf-contact-form/contact-form.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pcf-contact-form/core/new-options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pcf-contact-form/core/pcfcf-options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/pcf-contact-form/core/form.php:87
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/pcf-contact-form/sql/createtable.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (No screenshots at the moment.) image missing
The official readme.txt is a good inspiration

pcf-contact-form/contact-form.php 85% from 13 tests

"PCF Contact Form" version 1.2.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Main file name: The principal plugin file should be the same as the plugin slug ("pcf-contact-form.php" instead of "contact-form.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected611 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP68078572
CSS10139

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Functions35
▷ Named functions35100.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
There are no PNG files in this plugin