78% cf7-polylang

Code Review | Contact Form 7 Polylang Module

WordPress plugin Contact Form 7 Polylang Module scored 78% from 54 tests.

About plugin

  • Plugin page: cf7-polylang
  • Plugin version: 2.4.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9.2
  • WordPress version: 6.3.1
  • First release: May 6, 2016
  • Latest release: Mar 13, 2022
  • Number of updates: 64
  • Update frequency: every 33.4 days
  • Top authors: aurovrata (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

7,000+ active / 93,265 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.57ms] Passed 4 tests

This is a short check of server-side resources used by Contact Form 7 Polylang Module
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.01 ▲1.89
Dashboard /wp-admin3.31 ▲0.0044.51 ▼2.43
Posts /wp-admin/edit.php3.36 ▲0.0049.77 ▲2.16
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.00 ▼7.90
Media Library /wp-admin/upload.php3.23 ▲0.0036.00 ▲2.19

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Contact Form 7 Polylang Module
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.33 ▼1.231.57 ▼0.2939.40 ▼2.99
Dashboard /wp-admin2,206 ▲184.86 ▼0.06111.49 ▼8.1338.84 ▼10.10
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0239.56 ▼1.8134.05 ▼2.85
Add New Post /wp-admin/post-new.php1,534 ▲1523.07 ▲0.27630.48 ▲22.5453.51 ▲0.34
Media Library /wp-admin/upload.php1,388 ▲64.25 ▲0.0594.60 ▼9.1343.83 ▼1.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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 fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/cf7-polylang/public/partials/cf7-polylang-public-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WPCF7_ContactForm' not found in wp-content/plugins/cf7-polylang/admin/partials/cf7-polylang-edit-metabox.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: multilingual form, contact form 7 extension, contact form 7 module, polylang, cf7 smart grid extension...

cf7-polylang/cf7-polylang.php 92% from 13 tests

The primary PHP file in "Contact Form 7 Polylang Module" version 2.4.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 293 characters long)

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 plugin991 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP14139761652
PO File355132218
Bourne Shell121964
CSS21529
JavaScript393028

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity11.75
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity2.95
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods44
▷ Static methods613.64%
▷ Public methods3681.82%
▷ Protected methods36.82%
▷ Private methods511.36%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin