90% cities-shipping-zones-for-woocommerce

Code Review | Cities Shipping Zones for WooCommerce

WordPress plugin Cities Shipping Zones for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: cities-shipping-z...
  • Plugin version: 1.2.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4
  • WordPress version: 6.3.1
  • First release: Apr 14, 2020
  • Latest release: Oct 22, 2023
  • Number of updates: 97
  • Update frequency: every 13.3 days
  • Top authors: condless (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

3,000+ active /48,882 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
Install script ran successfully

Server metrics [RAM: ▲0.26MB] [CPU: ▼4.77ms] Passed 4 tests

This is a short check of server-side resources used by Cities Shipping Zones for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2741.49 ▲4.53
Dashboard /wp-admin3.58 ▲0.2351.99 ▼8.93
Posts /wp-admin/edit.php3.69 ▲0.3447.67 ▲3.51
Add New Post /wp-admin/post-new.php6.16 ▲0.2785.33 ▼12.07
Media Library /wp-admin/upload.php3.50 ▲0.2736.71 ▼1.60

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Cities Shipping Zones for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.26 ▼0.271.65 ▲0.0244.09 ▲1.23
Dashboard /wp-admin2,192 ▲115.63 ▼0.0594.96 ▼9.7141.70 ▼2.97
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0236.47 ▼1.9835.61 ▼2.75
Add New Post /wp-admin/post-new.php1,526 ▼223.50 ▲0.54681.55 ▲18.9753.33 ▲0.13
Media Library /wp-admin/upload.php1,400 ▲64.17 ▼0.1092.48 ▼16.7643.56 ▼2.64

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

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)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
No output text or server-side errors detected on direct access of PHP files

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 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed: The official readme.txt might help

cities-shipping-zones-for-woocommerce/cities-shipping-zones-for-woocommerce.php Passed 13 tests

The primary PHP file in "Cities Shipping Zones for WooCommerce" version 1.2.4 is used by WordPress to initiate all plugin functionality
104 characters long description:
WooCommerce plugin for turning the state field into a dropdown city field. To be used as shipping zones.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin267,462 lines of code in 96 files:
LanguageFilesBlank linesComment linesLines of code
PHP933721,357187,832
PO File326,49327,18679,630

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity261.00
▷ Minimum class complexity261.00
▷ Maximum class complexity261.00
Average method complexity6.40
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods49
▷ Static methods00.00%
▷ Public methods49100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.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