84% cf7-countries

Code Review | Contact Form 7 Countries

WordPress plugin Contact Form 7 Countries scored84%from 54 tests.

About plugin

  • Plugin page: cf7-countries
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.1
  • WordPress version: 6.3.1
  • First release: Feb 24, 2019
  • Latest release: Feb 24, 2019
  • Number of updates: 13
  • Update frequency: every 0.3 days
  • Top authors: atelierlabo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

700+ active /3,473 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 successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Contact Form 7 Countries
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0052.62 ▲14.21
Dashboard /wp-admin3.31 ▲0.0044.33 ▼0.86
Posts /wp-admin/edit.php3.36 ▲0.0044.14 ▼5.34
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.84 ▼4.53
Media Library /wp-admin/upload.php3.23 ▲0.0032.32 ▼1.13

Server storage [IO: ▲0.06MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Contact Form 7 Countries: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.19 ▼1.161.85 ▼0.0441.18 ▲2.26
Dashboard /wp-admin2,206 ▲155.83 ▲0.9699.17 ▼4.4839.55 ▼2.50
Posts /wp-admin/edit.php2,089 ▲31.99 ▼0.0439.53 ▼0.7033.27 ▼4.72
Add New Post /wp-admin/post-new.php1,542 ▲2318.64 ▼4.15674.75 ▼18.6565.84 ▲0.17
Media Library /wp-admin/upload.php1,385 ▼64.14 ▼0.0598.44 ▲0.9641.37 ▼4.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/cf7-countries/public/partials/cf7-countries-public-display.php
    • > /wp-content/plugins/cf7-countries/admin/partials/cf7-countries-admin-display.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: contact, form, contact form, email, feedback...

cf7-countries/cf7-countries.php Passed 13 tests

The entry point to "Contact Form 7 Countries" version 1.0.0 is a PHP file that has certain tags in its header comment area
47 characters long description:
Add countries drop down menu to Contact Form 7.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected601 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12178500595
JavaScript24546
CSS2080

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity5.00
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity1.93
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods30
▷ Static methods310.00%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin