68% bootstrap-contact-form

Code Review | MA Bootstrap Contact Form

WordPress plugin MA Bootstrap Contact Form scored68%from 54 tests.

About plugin

  • Plugin page: bootstrap-contact...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.1
  • WordPress version: 6.3.1
  • First release: Jan 5, 2015
  • Latest release: May 23, 2015
  • Number of updates: 17
  • Update frequency: every 8.1 days
  • Top authors: malinantonsson (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /2,001 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.95MB] [CPU: ▼34.59ms] Passed 4 tests

Analyzing server-side resources used by MA Bootstrap Contact Form
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.55 ▼1.49
Dashboard /wp-admin3.00 ▼0.3126.53 ▼29.55
Posts /wp-admin/edit.php3.00 ▼0.3623.98 ▼25.41
Add New Post /wp-admin/post-new.php3.00 ▼2.8926.00 ▼73.14
Media Library /wp-admin/upload.php3.00 ▼0.2322.18 ▼10.25
Bootstrap Contact Form /wp-admin/options-general.php?page=Bootstrap_Contact_Form3.0024.58

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for MA Bootstrap Contact Form
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.40 ▼1.161.80 ▲0.0145.92 ▼3.94
Dashboard /wp-admin2,213 ▲254.87 ▲0.03103.48 ▼8.2739.87 ▼5.68
Posts /wp-admin/edit.php2,093 ▲12.01 ▲0.0034.54 ▼2.3832.98 ▼3.14
Add New Post /wp-admin/post-new.php1,522 ▼1323.00 ▼0.12635.96 ▼73.6550.90 ▼12.66
Media Library /wp-admin/upload.php1,395 ▲74.20 ▼0.0197.30 ▼7.2343.09 ▼2.26
Bootstrap Contact Form /wp-admin/options-general.php?page=Bootstrap_Contact_Form7962.0525.6729.00

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Bootstrap_Contact_Form
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=Bootstrap_Contact_Form
    • > Notice in wp-content/plugins/bootstrap-contact-form/includes/admin.php+2
    Undefined index: ma_bootstrapcontactform_hidden

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
Almost there! Just fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/bootstrap-contact-form/ma-bootstrap-contact-form.php:13
    • > PHP Notice
      Undefined index: ma_bootstrapcontactform_hidden in wp-content/plugins/bootstrap-contact-form/includes/admin.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/bootstrap-contact-form/includes/admin.php:11

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 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Contact form in english)
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === bootstrap-contact-form === )
You can take inspiration from this readme.txt

bootstrap-contact-form/ma-bootstrap-contact-form.php 92% from 13 tests

This is the main PHP file of "MA Bootstrap Contact Form" version 1.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("bootstrap-contact-form.php" instead of "ma-bootstrap-contact-form.php")

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 detected198 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP33116198

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin