83% wc-update-alert

Code Review | Message Alerts For WooCommerce

WordPress plugin Message Alerts For WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: wc-update-alert
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0
  • WordPress version: 6.3.1
  • First release: Jul 28, 2022
  • Latest release: Jul 29, 2022
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: wpslideshow (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,210 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.25MB] [CPU: ▼2.83ms] Passed 4 tests

A check of server-side resources used by Message Alerts For WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2340.49 ▼4.31
Dashboard /wp-admin3.55 ▲0.2552.90 ▲2.35
Posts /wp-admin/edit.php3.67 ▲0.3157.66 ▲0.53
Add New Post /wp-admin/post-new.php6.15 ▲0.27101.01 ▼3.56
Media Library /wp-admin/upload.php3.48 ▲0.2538.76 ▼3.98

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Message Alerts For WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲15313.98 ▼0.425.41 ▲3.3741.94 ▼6.30
Dashboard /wp-admin2,240 ▲405.84 ▼0.04117.31 ▲10.4943.99 ▼6.84
Posts /wp-admin/edit.php2,119 ▲162.02 ▼0.0341.10 ▼1.3634.23 ▼1.04
Add New Post /wp-admin/post-new.php1,540 ▲923.24 ▲0.17614.36 ▼89.3681.65 ▲11.28
Media Library /wp-admin/upload.php1,410 ▲104.25 ▲0.06103.69 ▼23.6044.96 ▼6.38

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

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

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
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wc-update-alert/public/partials/message-alerts-for-woocommerce-public-display.php
    • > /wp-content/plugins/wc-update-alert/admin/partials/message-alerts-for-woocommerce-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === wc-update-alert === )
  • Screenshots: No descriptions were found for these screenshots #4, #5 in wc-update-alert/assets to your readme.txt
The official readme.txt is a good inspiration

wc-update-alert/message-alerts-for-woocommerce.php 85% from 13 tests

The main PHP file in "Message Alerts For WooCommerce" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wc-update-alert.php" instead of "message-alerts-for-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin710 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP13141564686
CSS241318
JavaScript24546

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity3.62
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.52
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods40
▷ Static methods410.00%
▷ Public methods3587.50%
▷ Protected methods00.00%
▷ Private methods512.50%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin