89% my-country-states-for-woocommerce

Code Review | My Country States For WooCommerce

WordPress plugin My Country States For WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: my-country-states...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Oct 4, 2023
  • Latest release: Oct 4, 2023
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: 2bytecode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /22 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 gracefully, with no errors

Server metrics [RAM: ▲1.28MB] [CPU: ▼2.70ms] Passed 4 tests

Analyzing server-side resources used by My Country States For WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.75 ▲1.2839.98 ▲0.31
Dashboard /wp-admin4.59 ▲1.2956.84 ▲1.22
Posts /wp-admin/edit.php4.64 ▲1.2850.78 ▼4.14
Add New Post /wp-admin/post-new.php7.17 ▲1.2892.76 ▼8.18
Media Library /wp-admin/upload.php4.51 ▲1.2840.94 ▲5.58

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for My Country States For WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.59 ▼0.791.65 ▼0.0339.21 ▲0.68
Dashboard /wp-admin2,222 ▲345.86 ▲0.77110.75 ▲6.8840.98 ▼0.33
Posts /wp-admin/edit.php2,104 ▲362.03 ▼0.0038.37 ▲0.9233.50 ▼1.58
Add New Post /wp-admin/post-new.php1,549 ▲2823.17 ▼0.02689.35 ▲9.7453.68 ▼0.99
Media Library /wp-admin/upload.php1,404 ▲164.22 ▲0.09101.51 ▼7.6642.35 ▼3.11

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 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)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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
These attributes need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3, #4 in my-country-states-for-woocommerce/assets to your readme.txt
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt might help

my-country-states-for-woocommerce/my-country-states-for-woocommerce.php Passed 13 tests

Analyzing the main PHP file in "My Country States For WooCommerce" version 1.0.0
104 characters long description:
Add the states/provinces/districts/regions of missing countries on checkout billing and shipping fields.

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
There were no executable files found in this plugin4,598 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP116431,8994,555
Markdown121043

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.04
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.03
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods200
▷ Static methods18492.00%
▷ Public methods19698.00%
▷ Protected methods00.00%
▷ Private methods42.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin