84% cf7-country-code-drop-down

Code Review | Country Code Drop Down For CF7

WordPress plugin Country Code Drop Down For CF7 scored84%from 54 tests.

About plugin

  • Plugin page: cf7-country-code-...
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 28, 2022
  • Latest release: Jan 10, 2023
  • Number of updates: 10
  • Update frequency: every 1.3 days
  • Top authors: wpteamindianic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /731 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.05ms] Passed 4 tests

This is a short check of server-side resources used by Country Code Drop Down For CF7
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0637.26 ▲0.42
Dashboard /wp-admin3.37 ▲0.0247.21 ▼16.14
Posts /wp-admin/edit.php3.42 ▲0.0647.83 ▲0.94
Add New Post /wp-admin/post-new.php5.95 ▲0.0684.01 ▲2.57
Media Library /wp-admin/upload.php3.29 ▲0.0637.95 ▲3.13

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Country Code Drop Down For CF7
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.241.59 ▼0.0539.35 ▼0.06
Dashboard /wp-admin2,189 ▲95.62 ▲0.0993.55 ▲7.9444.34 ▲2.59
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0439.56 ▲4.7934.35 ▼1.97
Add New Post /wp-admin/post-new.php1,527 ▲123.16 ▼0.12646.56 ▼64.0764.03 ▲13.41
Media Library /wp-admin/upload.php1,400 ▲34.19 ▲0.03108.81 ▲11.4249.13 ▼0.15

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • 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 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% 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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-country-code-drop-down/public/cf7-cc-form-tag.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-country-code-drop-down/admin/admin_init.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Requires at least: Invalid version format
Please take inspiration from this readme.txt

cf7-country-code-drop-down/cf7-country-code-addon.php 92% from 13 tests

The primary PHP file in "Country Code Drop Down For CF7" version 1.0.4 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cf7-country-code-drop-down.php" instead of "cf7-country-code-addon.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin2,983 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript6283881,765
CSS2514963
PHP45682216
Markdown116039

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions9
▷ Named functions9100.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
2 compressed PNG files occupy 0.07MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/flags@2x.png52.48KB56.11KB0.00%
public/img/flags.png19.57KB20.80KB0.00%