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

Code Review | Advance Flat Rate Shipping For WooCommerce

WordPress plugin Advance Flat Rate Shipping For WooCommerce scored83%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: 6.3.1
  • 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 /1,120 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: ▼7.72ms] Passed 4 tests

An overview of 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.48 ▲0.0238.71 ▲0.05
Dashboard /wp-admin3.33 ▼0.0244.35 ▼12.85
Posts /wp-admin/edit.php3.38 ▲0.0246.28 ▼0.51
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.39 ▼17.58
Media Library /wp-admin/upload.php3.25 ▲0.0234.40 ▲0.32

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Advance Flat Rate Shipping For WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.25 ▼1.181.98 ▲0.0944.57 ▼0.10
Dashboard /wp-admin2,206 ▲185.84 ▲0.97112.65 ▼6.3241.95 ▼7.10
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0541.50 ▲2.0136.46 ▲1.52
Add New Post /wp-admin/post-new.php1,537 ▲1823.45 ▲0.21667.78 ▼111.7751.16 ▼11.35
Media Library /wp-admin/upload.php1,382 ▼04.18 ▲0.0197.89 ▼0.7041.45 ▼4.18

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 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
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > 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 undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
There were not plugin tags detected

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

The principal PHP file in "Advance Flat Rate Shipping For WooCommerce" v. 1.1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("advance-flat-rate-shipping-for-woocommerce.php" instead of "woocommerce-shipping-advance-flat-rate.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0" instead of "3.2.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected727 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP5201315727

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems 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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected