10% the-basic-contact-form

Code Review | Basic Contact Form

WordPress plugin Basic Contact Form scored10%from 54 tests.

About plugin

  • Plugin page: the-basic-contact...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.3
  • WordPress version: 6.3.1
  • First release: Aug 11, 2023
  • Latest release: Oct 6, 2023
  • Number of updates: 6
  • Update frequency: every 35.3 days
  • Top authors: thecontactform (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /664 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/the-basic-contact-form/basic-contact-form.php+99
    Undefined variable: print

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

A check of server-side resources used by Basic Contact Form
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.39 ▲1.22
Dashboard /wp-admin3.34 ▲0.0347.94 ▼3.90
Posts /wp-admin/edit.php3.39 ▲0.0343.41 ▼2.96
Add New Post /wp-admin/post-new.php5.92 ▲0.0391.78 ▼15.16
Media Library /wp-admin/upload.php3.26 ▲0.0336.25 ▲1.09

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 45 new files
Database: 1 new table, 6 new options
New tables
wp_basic_contact_form
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Basic Contact Form
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,901 ▲14013.42 ▼1.149.31 ▲7.6543.84 ▲3.49
Dashboard /wp-admin2,218 ▲415.62 ▼0.0394.36 ▲4.8743.10 ▲3.25
Posts /wp-admin/edit.php2,114 ▲142.00 ▼0.0333.85 ▼0.1534.93 ▲3.33
Add New Post /wp-admin/post-new.php1,547 ▲1318.27 ▲0.17618.78 ▼25.5765.66 ▲2.57
Media Library /wp-admin/upload.php1,411 ▲84.17 ▲0.0198.43 ▼5.9941.57 ▼4.36

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/the-basic-contact-form/includes/bcf-settings-form-templates.php:6
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/the-basic-contact-form/includes/bcf-settings-form-templates.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/the-basic-contact-form/includes/bcf-admin-setting-controls.php:28
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/the-basic-contact-form/includes/bcf-admin-setting-controls.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 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
10 plugin tags: basic contact form, captcha, feedback, contact form, ajax...

the-basic-contact-form/basic-contact-form.php 85% from 13 tests

The entry point to "Basic Contact Form" version 1.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("the-basic-contact-form.php" instead of "basic-contact-form.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
There were no executable files found in this plugin5,481 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PO File171,4491,9934,842
PHP310126366
CSS2200235
JavaScript17038

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/liner.png0.78KB1.05KB0.00%