10% contact-form-24

Code Review | Contact Form 24

WordPress plugin Contact Form 24 scored10%from 54 tests.

About plugin

  • Plugin page: contact-form-24
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5
  • WordPress version: 6.3.1
  • First release: Feb 6, 2013
  • Latest release: Feb 8, 2013
  • Number of updates: 14
  • Update frequency: every 0.1 days
  • Top authors: my-wp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,369 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
Please fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/contact-form-24/Contact_Form_24.php+74
    Undefined index: page

Server metrics [RAM: ▼1.92MB] [CPU: ▼56.76ms] Passed 4 tests

Analyzing server-side resources used by Contact Form 24
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.405.33 ▼36.95
Dashboard /wp-admin2.08 ▼1.225.88 ▼42.22
Posts /wp-admin/edit.php2.08 ▼1.275.70 ▼49.59
Add New Post /wp-admin/post-new.php2.08 ▼3.805.94 ▼98.26
Media Library /wp-admin/upload.php2.08 ▼1.155.79 ▼32.71

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
cf_24_settings
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Contact Form 24
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,963 ▲20213.58 ▼0.7811.53 ▲9.6650.99 ▲6.44
Dashboard /wp-admin2,211 ▲345.57 ▲0.0286.92 ▼1.0038.78 ▼1.23
Posts /wp-admin/edit.php2,119 ▲192.00 ▲0.0336.23 ▼2.7031.09 ▼6.71
Add New Post /wp-admin/post-new.php1,547 ▲2117.98 ▼5.68635.11 ▼40.0682.79 ▲30.08
Media Library /wp-admin/upload.php1,416 ▲134.19 ▼0.0998.79 ▼7.4441.35 ▼7.19

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/contact-form-24/Contact_Form_24.php+74
    Undefined index: page
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Please fix the following items
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/contact-form-24/Contact_Form_24.php:60
    • > PHP Notice
      Undefined index: your_email in wp-content/plugins/contact-form-24/Submit.php on line 7
    • > PHP Notice
      Undefined index: email in wp-content/plugins/contact-form-24/Submit.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/contact-form-24/html/settings.php:3
    • > PHP Notice
      Undefined index: text in wp-content/plugins/contact-form-24/Submit.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/contact-form-24/html/form.php:3
    • > PHP Notice
      Undefined index: name in wp-content/plugins/contact-form-24/Submit.php on line 3
    • > PHP Notice
      Undefined index: web in wp-content/plugins/contact-form-24/Submit.php on line 5
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/contact-form-24/Contact_Form_24.php on line 47

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

readme.txt Passed 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
9 plugin tags: contact fields, custom contact form, captcha form, email, web form...

contact-form-24/Contact_Form_24.php 92% from 13 tests

Analyzing the main PHP file in "Contact Form 24" version 1.0
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("contact-form-24.php" instead of "Contact_Form_24.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
Success! There were no dangerous files found in this plugin1,855 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4187531,461
PHP47522306
CSS111079
HTML1309

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.70
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
4 PNG files occupy 0.10MB with 0.05MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/jscolor/hs.png2.62KB7.54KB0.00%
img/minus.png47.56KB1.15KB▼ 97.59%
js/jscolor/hv.png2.80KB7.32KB0.00%
img/plus.png47.52KB1.15KB▼ 97.59%