83% multilingual-contact-form-7-with-polylang

Code Review | Multilingual Contact Form 7 with Polylang

WordPress plugin Multilingual Contact Form 7 with Polylang scored83%from 54 tests.

About plugin

  • Plugin page: multilingual-cont...
  • Plugin version: 1.0.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7.0-6.2
  • WordPress version: 6.3.1
  • First release: Jun 24, 2021
  • Latest release: May 25, 2023
  • Number of updates: 12
  • Update frequency: every 58.5 days
  • Top authors: andreasmuench (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

4,000+ active /16,114 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Multilingual Contact Form 7 with Polylang
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0346.17 ▼7.78
Dashboard /wp-admin3.33 ▲0.0345.06 ▼7.30
Posts /wp-admin/edit.php3.38 ▲0.0348.49 ▼7.13
Add New Post /wp-admin/post-new.php5.91 ▲0.0386.79 ▼7.23
Media Library /wp-admin/upload.php3.25 ▲0.0332.59 ▼1.25
Multilangual CF7 Polylang /wp-admin/options-general.php?page=mlcf7pll-plugin-settings3.2231.90

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Multilingual Contact Form 7 with Polylang
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.18 ▼1.574.31 ▲2.5038.90 ▼4.72
Dashboard /wp-admin2,210 ▲224.85 ▼1.02110.99 ▲11.1636.55 ▼7.36
Posts /wp-admin/edit.php2,090 ▲12.05 ▼0.0138.99 ▲2.5933.88 ▲1.13
Add New Post /wp-admin/post-new.php1,528 ▲1423.38 ▲5.88681.29 ▼13.2258.41 ▲4.99
Media Library /wp-admin/upload.php1,392 ▲74.32 ▲0.1491.92 ▼27.1940.40 ▼6.48
Multilangual CF7 Polylang /wp-admin/options-general.php?page=mlcf7pll-plugin-settings7872.0325.1328.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'mlcf7pll\\core\\settings\\Settings_Page' not found in wp-content/plugins/multilingual-contact-form-7-with-polylang/admin/Settings_Page.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mlcf7pll\\frontend\\add_filter() in wp-content/plugins/multilingual-contact-form-7-with-polylang/frontend/String_Translation.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mlcf7pll\\admin\\add_action() in wp-content/plugins/multilingual-contact-form-7-with-polylang/admin/String_Registration.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mlcf7pll\\frontend\\add_filter() in wp-content/plugins/multilingual-contact-form-7-with-polylang/frontend/Submission.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mlcf7pll\\frontend\\is_admin() in wp-content/plugins/multilingual-contact-form-7-with-polylang/frontend/Form_Locale.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mlcf7pll\\frontend\\is_admin() in wp-content/plugins/multilingual-contact-form-7-with-polylang/frontend/Messages_Translation.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mlcf7pll\\admin\\add_filter() in wp-content/plugins/multilingual-contact-form-7-with-polylang/admin/Editor_Panels.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: multilingual, polylang, translate, contact form 7, language

multilingual-contact-form-7-with-polylang/plugin.php 77% from 13 tests

"Multilingual Contact Form 7 with Polylang" version 1.0.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("/languages.")
  • Main file name: The principal plugin file should be the same as the plugin slug ("multilingual-contact-form-7-with-polylang.php" instead of "plugin.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 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin785 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP11333355730
JavaScript2201555

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity11.00
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes19.09%
Methods55
▷ Static methods1527.27%
▷ Public methods5192.73%
▷ Protected methods47.27%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin