93% city-dropdown-for-woocommerce

Code Review | City Dropdown For Woocommerce

WordPress plugin City Dropdown For Woocommerce scored 93% from 54 tests.

About plugin

  • Plugin page: city-dropdown-for...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 5.8.1
  • First release: Apr 23, 2020
  • Latest release: Apr 23, 2020
  • Number of updates: 9
  • Update frequency: N/A
  • Top authors: danielflorea (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active / 1,309 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼138.93ms] Passed 4 tests

This is a short check of server-side resources used by City Dropdown For Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.0334.42 ▼1.42
Dashboard /wp-admin3.10 ▲0.0446.37 ▼0.05
Posts /wp-admin/edit.php3.15 ▲0.0441.91 ▼3.64
Add New Post /wp-admin/post-new.php5.45 ▲0.0289.88 ▼550.59
Media Library /wp-admin/upload.php3.04 ▲0.0333.64 ▲3.12

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by City Dropdown For Woocommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10816.02 ▼0.1310.74 ▲0.4045.53 ▼5.84
Dashboard /wp-admin2,973 ▲425.90 ▼0.16144.33 ▼15.33114.58 ▲0.31
Posts /wp-admin/edit.php2,739 ▲32.71 ▲0.0162.83 ▼2.3888.07 ▼5.62
Add New Post /wp-admin/post-new.php1,615 ▼5721.94 ▲3.15281.81 ▼85.82107.18 ▼5.05
Media Library /wp-admin/upload.php1,807 ▼05.06 ▲0.04145.08 ▼9.28119.69 ▲2.13

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

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
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/city-dropdown-for-woocommerce/city-dropdown.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test


Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Please a description for screenshot #1 in city-dropdown-for-woocommerce/assets to your readme.txt
  • License uri: Invalid URI ("")
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
The official readme.txt is a good inspiration

city-dropdown-for-woocommerce/city-dropdown.php 85% from 13 tests

The main PHP file in "City Dropdown For Woocommerce" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("city-dropdown-for-woocommerce.php" instead of "city-dropdown.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
There were no executable files found in this plugin14,241 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity35.00
▷ Minimum class complexity35.00
▷ Maximum class complexity35.00
Average method complexity3.43
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods1285.71%
▷ Protected methods00.00%
▷ Private methods214.29%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
No PNG images were found in this plugin