79% pj-contact-form

Code Review | PJ Contact Form

WordPress plugin PJ Contact Form scored79%from 54 tests.

About plugin

  • Plugin page: pj-contact-form
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.1.1
  • WordPress version: 6.3.1
  • First release: May 7, 2019
  • Latest release: May 7, 2019
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: profjava (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /541 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

This is a short check of server-side resources used by PJ Contact Form
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0739.44 ▼7.23
Dashboard /wp-admin3.37 ▲0.0655.33 ▲3.02
Posts /wp-admin/edit.php3.42 ▲0.0650.72 ▼1.27
Add New Post /wp-admin/post-new.php5.96 ▲0.0687.64 ▼20.78
Media Library /wp-admin/upload.php3.30 ▲0.0638.89 ▲3.81
Add New /wp-admin/post-new.php?post_type=emails3.3348.27
Emails /wp-admin/edit.php?post_type=emails3.3440.33

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for PJ Contact Form
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,943 ▲18213.80 ▼0.499.03 ▲7.4042.29 ▼1.76
Dashboard /wp-admin2,241 ▲615.59 ▼0.0889.83 ▼1.9039.89 ▼1.40
Posts /wp-admin/edit.php2,143 ▲431.96 ▼0.0642.04 ▲3.9538.70 ▲1.68
Add New Post /wp-admin/post-new.php1,562 ▲3623.12 ▼0.59661.25 ▼43.8468.06 ▲6.97
Media Library /wp-admin/upload.php1,440 ▲374.29 ▲0.09101.27 ▲2.9144.24 ▼0.32
Add New /wp-admin/post-new.php?post_type=emails1,5392.5159.3065.78
Emails /wp-admin/edit.php?post_type=emails1,1321.9831.4431.92

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=emails
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/pj-contact-form/templates/pjcf-settings.php:3

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

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: simple contact form, contact form, send email, contact, form

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

The main PHP file in "PJ Contact Form" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
20 characters long description:
Contact Form Plugin.

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
Good job! No executable or dangerous file extensions detected249 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP63532249

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There are no PNG files in this plugin