83% bangladesh-district-upazilla-dropdown-list-for-contact-form-7

Code Review | Bangladesh (District & Upazilla) Dropdown list for Contact form 7

WordPress plugin Bangladesh (District & Upazilla) Dropdown list for Contact form 7 scored83%from 54 tests.

About plugin

  • Plugin page: bangladesh-distri...
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.1
  • WordPress version: 6.3.1
  • First release: Jun 18, 2020
  • Latest release: Oct 13, 2020
  • Number of updates: 10
  • Update frequency: every 11.8 days
  • Top authors: psdtowpservice (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /996 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
Installer ran successfully

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

An overview of server-side resources used by Bangladesh (District & Upazilla) Dropdown list for Contact form 7
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0046.53 ▲7.50
Dashboard /wp-admin3.31 ▲0.0059.42 ▲5.56
Posts /wp-admin/edit.php3.36 ▲0.0052.32 ▼6.75
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.86 ▼8.68
Media Library /wp-admin/upload.php3.23 ▲0.0035.96 ▲2.77

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Bangladesh (District & Upazilla) Dropdown list for Contact form 7
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.42 ▲0.071.95 ▲0.1043.50 ▼0.63
Dashboard /wp-admin2,198 ▲245.62 ▲0.1094.81 ▼4.3540.57 ▼3.11
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0135.27 ▼1.7133.00 ▼7.52
Add New Post /wp-admin/post-new.php1,529 ▲323.31 ▲0.27644.64 ▼17.9547.96 ▼14.63
Media Library /wp-admin/upload.php1,394 ▼94.22 ▲0.0497.06 ▼9.8840.62 ▼6.86

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • 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
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bangladesh-district-upazilla-dropdown-list-for-contact-form-7/inc/en/upazilla-list-english.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bangladesh-district-upazilla-dropdown-list-for-contact-form-7/inc/bn/upazilla-list-bangla.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bangladesh-district-upazilla-dropdown-list-for-contact-form-7/inc/bn/district-list-bangla.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bangladesh-district-upazilla-dropdown-list-for-contact-form-7/inc/en/district-list-english.php:8

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Donate link: Please fix this invalid URI: ""
You can take inspiration from this readme.txt

bangladesh-district-upazilla-dropdown-list-for-contact-form-7/contact-form-7-bd.php 85% from 13 tests

"Bangladesh (District & Upazilla) Dropdown list for Contact form 7" version 1.1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bangladesh-district-upazilla-dropdown-list-for-contact-form-7.php" instead of "contact-form-7-bd.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin975 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP57837975

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.05
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%
Functions10
▷ Named functions10100.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
No PNG files were detected