84% shopwarden

Code Review | Shopwarden - Automated WooCommerce monitoring & testing

WordPress plugin Shopwarden - Automated WooCommerce monitoring & testing scored84%from 54 tests.

About plugin

  • Plugin page: shopwarden
  • Plugin version: 1.0.11
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4
  • WordPress version: 6.3.1
  • First release: Mar 22, 2022
  • Latest release: Nov 8, 2023
  • Number of updates: 19
  • Update frequency: every 31.4 days
  • Top authors: shopwarden (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /1,428 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼6.03ms] Passed 4 tests

Analyzing server-side resources used by Shopwarden - Automated WooCommerce monitoring & testing
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0838.74 ▼0.62
Dashboard /wp-admin3.40 ▲0.0546.93 ▼11.69
Posts /wp-admin/edit.php3.51 ▲0.1545.64 ▼3.36
Add New Post /wp-admin/post-new.php5.98 ▲0.0992.46 ▼6.42
Media Library /wp-admin/upload.php3.32 ▲0.0834.95 ▼2.64
Shopwarden /wp-admin/admin.php?page=shopwarden3.30309.84

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Shopwarden - Automated WooCommerce monitoring & testing
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.34 ▲0.101.62 ▲0.0743.79 ▲4.22
Dashboard /wp-admin2,198 ▲215.62 ▼0.0382.67 ▼3.1039.25 ▼3.91
Posts /wp-admin/edit.php2,100 ▼02.08 ▲0.1340.36 ▼0.6436.33 ▼4.62
Add New Post /wp-admin/post-new.php1,526 ▼023.72 ▲0.61606.61 ▼92.9051.52 ▼15.09
Media Library /wp-admin/upload.php1,397 ▼34.21 ▲0.02100.82 ▼3.6542.15 ▼0.65
Shopwarden /wp-admin/admin.php?page=shopwarden7642.0125.7924.24

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • shopwarden_auto_delete_customer
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/shopwarden/includes/fake-payment-gateway.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: monitoring, testing, woocommerce

shopwarden/shopwarden.php 92% from 13 tests

"Shopwarden - Automated WooCommerce monitoring & testing" version 1.0.11's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Requires at least: The required version number must match the one declared in readme.txt ("5.9" instead of "5.6")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected583 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP229669583

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity57.50
▷ Minimum class complexity7.00
▷ Maximum class complexity108.00
Average method complexity7.65
▷ Minimum method complexity1.00
▷ Maximum method complexity70.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin