83% geargag-advanced-shipping-for-woocommerce

Code Review | Geargag Advanced Shipping for WooCommerce

WordPress plugin Geargag Advanced Shipping for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: geargag-advanced-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.0+
  • WordPress version: 6.3.1
  • First release: Dec 14, 2019
  • Latest release: Dec 14, 2019
  • Number of updates: 7
  • Update frequency: every 0.9 days
  • Top authors: geargag (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /493 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.89ms] Passed 4 tests

Analyzing server-side resources used by Geargag Advanced Shipping for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.39 ▲0.01
Dashboard /wp-admin3.32 ▲0.0244.94 ▼8.03
Posts /wp-admin/edit.php3.37 ▲0.0246.57 ▲4.55
Add New Post /wp-admin/post-new.php5.92 ▲0.0486.30 ▼7.58
Media Library /wp-admin/upload.php3.25 ▲0.0235.54 ▲4.03

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

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

Browser metrics Passed 4 tests

Geargag Advanced Shipping for WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲9813.44 ▼1.191.76 ▲0.0042.53 ▼0.80
Dashboard /wp-admin2,239 ▲485.94 ▲0.9096.67 ▼8.1739.51 ▼1.18
Posts /wp-admin/edit.php2,123 ▲372.24 ▲0.2641.22 ▲0.7137.25 ▲1.69
Add New Post /wp-admin/post-new.php1,530 ▼1223.40 ▲5.13656.61 ▲26.3751.40 ▼15.67
Media Library /wp-admin/upload.php1,420 ▲324.32 ▲0.1496.98 ▼2.5842.18 ▼5.24

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 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 everything seems fine, this is not an exhaustive test

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
Please fix the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Interface 'Geargag_Advanced_Shipping\\tools\\contracts\\Bootable' not found in wp-content/plugins/geargag-advanced-shipping-for-woocommerce/tools/contracts/Enqueueable.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/geargag-advanced-shipping-for-woocommerce/tools/Shipping_Base.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Geargag_Advanced_Shipping\\tools\\Shipping_Base' not found in wp-content/plugins/geargag-advanced-shipping-for-woocommerce/shipping/Advanced_Shipping.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Geargag_Advanced_Shipping\\tools\\contracts\\Bootable' not found in wp-content/plugins/geargag-advanced-shipping-for-woocommerce/shipping/Shipping.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: There are too many tags (13 tag instead of maximum 10)
  • Requires at least: Version format is invalid
  • Tested up to: Version format is invalid
The official readme.txt is a good inspiration

geargag-advanced-shipping-for-woocommerce/index.php 85% from 13 tests

The entry point to "Geargag Advanced Shipping for WooCommerce" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 407 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("geargag-advanced-shipping-for-woocommerce.php" instead of "index.php")

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
Everything looks great! No dangerous files found in this plugin1,889 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP262862631,823
SVG10055
JSON1008
CSS2222
JavaScript1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity11.06
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces6
Interfaces6
Traits0
Classes12
▷ Abstract classes325.00%
▷ Concrete classes975.00%
▷ Final classes111.11%
Methods84
▷ Static methods55.95%
▷ Public methods7994.05%
▷ Protected methods33.57%
▷ Private methods22.38%
Functions12
▷ Named functions1083.33%
▷ Anonymous functions216.67%
Constants21
▷ Global constants1257.14%
▷ Class constants942.86%
▷ Public constants9100.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 images were found in this plugin