89% wpfactory-conditional-shipping-for-woocommerce

Code Review | WPFactory Conditional Shipping for WooCommerce

WordPress plugin WPFactory Conditional Shipping for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: wpfactory-conditi...
  • Plugin version: 1.7.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.4
  • WordPress version: 6.3.1
  • First release: Aug 28, 2020
  • Latest release: Nov 20, 2023
  • Number of updates: 19
  • Update frequency: every 62.1 days
  • Top authors: algoritmika (68.42%)wpcodefactory (36.84%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,922 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

An overview of server-side resources used by WPFactory Conditional Shipping for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.46 ▼2.37
Dashboard /wp-admin3.32 ▲0.0244.81 ▼0.80
Posts /wp-admin/edit.php3.37 ▲0.0245.99 ▼2.13
Add New Post /wp-admin/post-new.php5.90 ▲0.0289.35 ▼11.91
Media Library /wp-admin/upload.php3.25 ▲0.0233.76 ▲0.39

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

WPFactory Conditional Shipping for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2814.29 ▼0.061.80 ▼0.1737.61 ▼11.63
Dashboard /wp-admin2,192 ▲185.62 ▼0.0394.39 ▼5.2342.67 ▼3.30
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0139.61 ▼0.7036.02 ▲0.02
Add New Post /wp-admin/post-new.php1,526 ▼023.23 ▼0.39662.98 ▲30.3067.83 ▲12.97
Media Library /wp-admin/upload.php1,403 ▲34.16 ▼0.0794.95 ▼4.5142.29 ▲0.86

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 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)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: woo commerce, shipping, woocommerce

wpfactory-conditional-shipping-for-woocommerce/conditional-shipping-for-woocommerce.php 85% from 13 tests

"WPFactory Conditional Shipping for WooCommerce" version 1.7.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • 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: The principal plugin file should be the same as the plugin slug ("wpfactory-conditional-shipping-for-woocommerce.php" instead of "conditional-shipping-for-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,119 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP92255971,113
JavaScript21146

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.66
Average class complexity29.00
▷ Minimum class complexity1.00
▷ Maximum class complexity118.00
Average method complexity4.56
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes114.29%
Methods55
▷ Static methods11.82%
▷ Public methods55100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
There were not PNG files found in your plugin