10% wc-shipping-rates-importer

Code Review | WC Shipping Rates Importer

WordPress plugin WC Shipping Rates Importer scored10%from 54 tests.

About plugin

  • Plugin page: wc-shipping-rates...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.3-4.7.3
  • WordPress version: 6.3.1
  • First release: Aug 12, 2016
  • Latest release: Mar 12, 2017
  • Number of updates: 13
  • Update frequency: every 16.4 days
  • Top authors: joesat (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /5,801 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/wc-shipping-rates-importer/wc-shipping-rates-importer.php+345
    mkdir(): File exists

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.46ms] Passed 4 tests

This is a short check of server-side resources used by WC Shipping Rates Importer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0437.38 ▲0.01
Dashboard /wp-admin3.37 ▲0.0644.41 ▼5.70
Posts /wp-admin/edit.php3.42 ▲0.0646.24 ▼2.23
Add New Post /wp-admin/post-new.php5.95 ▲0.0681.90 ▼13.90
Media Library /wp-admin/upload.php3.29 ▲0.0636.25 ▲1.35

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

WC Shipping Rates Importer: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6613.19 ▼1.181.75 ▲0.0144.43 ▲3.75
Dashboard /wp-admin2,215 ▲245.84 ▲0.9896.80 ▼2.2139.41 ▼2.17
Posts /wp-admin/edit.php2,098 ▲62.03 ▲0.0534.55 ▼9.1435.66 ▲0.51
Add New Post /wp-admin/post-new.php1,557 ▲2923.31 ▲0.53677.74 ▲17.3164.48 ▼2.25
Media Library /wp-admin/upload.php1,403 ▲154.22 ▲0.0595.38 ▼3.7144.04 ▼4.31

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: woocommerce, shipping table rates, export, import

wc-shipping-rates-importer/wc-shipping-rates-importer.php Passed 13 tests

"WC Shipping Rates Importer" version 1.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
44 characters long description:
export and import Woocommerce Shipping Rates

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
No dangerous file extensions were detected428 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP360115364
PO File1232464

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.27
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity3.08
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods753.85%
▷ Protected methods646.15%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.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
There are no PNG files in this plugin