93% advance-flat-rate-shipping-for-woocommerce

Code Review | Advance Flat Rate Shipping For WooCommerce

WordPress plugin Advance Flat Rate Shipping For WooCommerce scored 93% from 54 tests.

About plugin

  • Plugin page: advance-flat-rate...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.0-4.9
  • WordPress version: 5.9.2
  • First release: Jan 9, 2018
  • Latest release: Jan 26, 2018
  • Number of updates: 6
  • Update frequency: every 3.5 days
  • Top authors: ishtiaqawan30 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 866 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.00MB] [CPU: ▼301.30ms] Passed 4 tests

Analyzing server-side resources used by Advance Flat Rate Shipping For WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0356.95 ▼18.55
Dashboard /wp-admin3.43 ▲0.0231.79 ▼2.77
Posts /wp-admin/edit.php3.66 ▲0.0237.10 ▼1.61
Add New Post /wp-admin/post-new.php6.90 ▼0.0798.47 ▼1,181.19
Media Library /wp-admin/upload.php3.32 ▲0.0223.69 ▼2.70

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Advance Flat Rate Shipping For WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲1915.86 ▲0.606.52 ▲0.112.16 ▼0.23
Dashboard /wp-admin2,890 ▲296.02 ▼0.11159.50 ▲17.42162.00 ▼2.53
Posts /wp-admin/edit.php2,691 ▲33.36 ▼0.0069.95 ▲6.41147.15 ▲1.49
Add New Post /wp-admin/post-new.php1,668 ▼8420.67 ▼0.21380.43 ▼84.07183.59 ▲21.80
Media Library /wp-admin/upload.php1,689 ▼95.51 ▲0.00152.46 ▼8.92220.67 ▼1.28

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/advance-flat-rate-shipping-for-woocommerce/includes/views/html-weight-ranges.php:9
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/advance-flat-rate-shipping-for-woocommerce/includes/views/html-table-rates.php:10

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
No plugin tags provided

advance-flat-rate-shipping-for-woocommerce/woocommerce-shipping-advance-flat-rate.php 77% from 13 tests

The main file in "Advance Flat Rate Shipping For WooCommerce" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.0" instead of "3.2.0")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("advance-flat-rate-shipping-for-woocommerce.php" instead of "woocommerce-shipping-advance-flat-rate.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 plugin727 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP5201315727

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity53.50
▷ Minimum class complexity6.00
▷ Maximum class complexity101.00
Average method complexity4.39
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods31
▷ Static methods13.23%
▷ Public methods2477.42%
▷ Protected methods00.00%
▷ Private methods722.58%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin