89% woo-shippings-payments-restrictions

Code Review | WooCommerce - Shippings Payments Restrictions

WordPress plugin WooCommerce - Shippings Payments Restrictions scored89%from 54 tests.

About plugin

  • Plugin page: woo-shippings-pay...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.0-5.0.3
  • WordPress version: 6.3.1
  • First release: Jan 20, 2019
  • Latest release: Jan 20, 2019
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: takereal (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /580 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Analyzing server-side resources used by WooCommerce - Shippings Payments Restrictions
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.73 ▼5.00
Dashboard /wp-admin3.31 ▲0.0044.55 ▼3.41
Posts /wp-admin/edit.php3.36 ▲0.0043.30 ▼4.00
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.17 ▲4.94
Media Library /wp-admin/upload.php3.23 ▲0.0033.08 ▼1.64

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce - Shippings Payments Restrictions
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.38 ▼0.181.74 ▲0.0442.64 ▼6.21
Dashboard /wp-admin2,195 ▲185.52 ▼0.0682.45 ▼15.6138.59 ▼5.15
Posts /wp-admin/edit.php2,103 ▲32.02 ▲0.0137.52 ▲0.8331.66 ▼3.06
Add New Post /wp-admin/post-new.php1,534 ▲818.07 ▼5.77620.83 ▼65.5079.17 ▲25.36
Media Library /wp-admin/upload.php1,403 ▲34.21 ▼0.0894.50 ▼18.7241.34 ▼7.90

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

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
Good news, no errors were detected

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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: shipping, payment gateways, woocommerce, payment gateway

woo-shippings-payments-restrictions/woocommerce-shippings-payments-restrictions.php 77% from 13 tests

The principal PHP file in "WooCommerce - Shippings Payments Restrictions" v. 1.0.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.7" instead of "3.4.0")
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-shippings-payments-restrictions.php" instead of "woocommerce-shippings-payments-restrictions.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin144 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP26363124
Markdown112020

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity9.00
▷ Minimum class complexity5.00
▷ Maximum class complexity13.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin