84% international-telephone-input-for-contact-form-7

Code Review | International Telephone Input for Contact Form 7

WordPress plugin International Telephone Input for Contact Form 7 scored84%from 54 tests.

About plugin

  • Plugin page: international-tel...
  • Plugin version: 1.5.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 24, 2015
  • Latest release: Feb 21, 2022
  • Number of updates: 51
  • Update frequency: every 44.2 days
  • Top authors: damiarita (72.55%)YordanSoares (29.41%)

Code review

54 tests

User reviews

25 reviews

Install metrics

10,000+ active /61,986 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

This is a short check of server-side resources used by International Telephone Input for Contact Form 7
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0045.20 ▲3.12
Dashboard /wp-admin3.31 ▲0.0050.18 ▲0.29
Posts /wp-admin/edit.php3.36 ▲0.0049.22 ▼2.69
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.86 ▼1.96
Media Library /wp-admin/upload.php3.23 ▲0.0036.88 ▼3.61

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by International Telephone Input for Contact Form 7
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲7514.26 ▼0.091.87 ▲0.2242.92 ▼3.17
Dashboard /wp-admin2,195 ▲155.54 ▼0.0685.12 ▼17.2339.95 ▼4.57
Posts /wp-admin/edit.php2,103 ▲31.98 ▲0.0039.77 ▲2.0136.62 ▲0.90
Add New Post /wp-admin/post-new.php1,526 ▼223.56 ▲0.37667.15 ▼10.3250.41 ▼5.11
Media Library /wp-admin/upload.php1,400 ▼04.12 ▼0.09112.99 ▲0.2349.16 ▼2.91

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

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
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/international-telephone-input-for-contact-form-7/includes/mail-tags.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/international-telephone-input-for-contact-form-7/includes/filter.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/international-telephone-input-for-contact-form-7/includes/form-tag.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/international-telephone-input-for-contact-form-7/includes/activation-checks.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/international-telephone-input-for-contact-form-7/includes/tag.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Requires at least: Invalid plugin version format
The official readme.txt is a good inspiration

international-telephone-input-for-contact-form-7/international-telephone-input-for-contact-form-7.php 92% from 13 tests

The main PHP file in "International Telephone Input for Contact Form 7" ver. 1.5.7 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 247 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin2,851 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript5143501,272
CSS2514963
PHP67633271
PO File363110243
Markdown1400102

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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
2 compressed PNG files occupy 0.07MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/intl-tel-input/img/flags.png19.57KB20.80KB0.00%
vendor/intl-tel-input/img/flags@2x.png52.48KB56.11KB0.00%