89% shipping-by-city-for-woocommerce

Code Review | Shipping by City for Woocommerce

WordPress plugin Shipping by City for Woocommerce scored89%from 54 tests.

About plugin

  • Plugin page: shipping-by-city-...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Feb 24, 2020
  • Latest release: Jul 6, 2023
  • Number of updates: 15
  • Update frequency: every 82.1 days
  • Top authors: rupeshjorkar (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

500+ active /6,920 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.45ms] Passed 4 tests

An overview of server-side resources used by Shipping by City for Woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.69 ▼7.03
Dashboard /wp-admin3.32 ▲0.0144.60 ▼3.78
Posts /wp-admin/edit.php3.43 ▲0.0747.54 ▼2.04
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.66 ▼12.93
Media Library /wp-admin/upload.php3.24 ▲0.0137.16 ▲5.46

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Shipping by City for Woocommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲6513.30 ▼1.363.99 ▲1.9442.78 ▼0.16
Dashboard /wp-admin2,217 ▲264.84 ▼0.20107.73 ▲6.5142.12 ▼1.44
Posts /wp-admin/edit.php2,099 ▲72.00 ▼0.0540.13 ▼0.5338.18 ▲1.54
Add New Post /wp-admin/post-new.php1,540 ▲623.20 ▲0.19606.88 ▲5.4052.76 ▲4.43
Media Library /wp-admin/upload.php1,399 ▲84.22 ▲0.0297.83 ▲0.6042.19 ▼1.62

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • License uri: Invalid URI ("")
  • Donate link: Invalid URI ("")
The official readme.txt might help

shipping-by-city-for-woocommerce/shipping-by-city-for-woocommerce.php Passed 13 tests

The main PHP script in "Shipping by City for Woocommerce" version 1.0.4 is automatically included on every request by WordPress
49 characters long description:
Calculate Shipping method by City for Woocommerce

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
Success! There were no dangerous files found in this plugin272 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP411454269
CSS1003

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity18.50
▷ Minimum class complexity9.00
▷ Maximum class complexity28.00
Average method complexity3.19
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods531.25%
▷ Public methods1381.25%
▷ Protected methods00.00%
▷ Private methods318.75%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected