90% category-notices-for-woocommerce

Code Review | Category Notices for WooCommerce

WordPress plugin Category Notices for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: category-notices-...
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7
  • WordPress version: 6.3.1
  • First release: Apr 5, 2021
  • Latest release: May 8, 2021
  • Number of updates: 6
  • Update frequency: every 6.2 days
  • Top authors: polyplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /458 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
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼12.23ms] Passed 4 tests

Analyzing server-side resources used by Category Notices for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0637.77 ▼8.95
Dashboard /wp-admin3.37 ▲0.0742.62 ▼14.33
Posts /wp-admin/edit.php3.48 ▲0.1350.99 ▼1.42
Add New Post /wp-admin/post-new.php5.95 ▲0.0684.96 ▼23.84
Media Library /wp-admin/upload.php3.29 ▲0.0635.21 ▼1.80

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
category_notices_for_woocommerce

Browser metrics Passed 4 tests

An overview of browser requirements for Category Notices for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.69 ▲0.051.65 ▼0.9342.35 ▼3.92
Dashboard /wp-admin2,201 ▲245.62 ▼0.0397.98 ▲2.4344.68 ▲0.79
Posts /wp-admin/edit.php2,109 ▲62.03 ▲0.0135.45 ▼4.5732.24 ▼7.85
Add New Post /wp-admin/post-new.php1,532 ▲622.98 ▲0.04684.15 ▲49.0650.06 ▼14.51
Media Library /wp-admin/upload.php1,409 ▲184.22 ▲0.04103.18 ▲0.8046.30 ▲1.65

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • category_notices_for_woocommerce
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

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)
Everything seems fine, however this is by no means an exhaustive test

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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: notices, product category notice, woocommerce, category notices, notice...

category-notices-for-woocommerce/category-notices-for-woocommerce.php Passed 13 tests

The main file in "Category Notices for WooCommerce" v. 1.0.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
49 characters long description:
Adds a notice to specific WooCommerce categories.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected349 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP14211289
CSS18035
JavaScript10125

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity43.00
▷ Minimum class complexity43.00
▷ Maximum class complexity43.00
Average method complexity3.21
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods421.05%
▷ Public methods19100.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
PNG images were not found in this plugin