89% custom-cart-page-notices-for-woocommerce

Code Review | Custom Cart Page Notices for WooCommerce

WordPress plugin Custom Cart Page Notices for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: custom-cart-page-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4.2
  • WordPress version: 6.3.1
  • First release: Jun 24, 2020
  • Latest release: Jul 7, 2020
  • Number of updates: 3
  • Update frequency: every 4.7 days
  • Top authors: Rynald0s (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /365 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Custom Cart Page Notices for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.13 ▼0.88
Dashboard /wp-admin3.33 ▲0.0246.37 ▼1.12
Posts /wp-admin/edit.php3.38 ▲0.0247.54 ▲1.34
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.31 ▼17.15
Media Library /wp-admin/upload.php3.25 ▲0.0235.06 ▲2.71

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Cart Page Notices for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.104.82 ▲3.1244.11 ▼0.85
Dashboard /wp-admin2,209 ▲245.85 ▲0.96101.32 ▼2.7940.12 ▼7.90
Posts /wp-admin/edit.php2,086 ▼62.05 ▼0.0039.34 ▲1.3335.20 ▲2.68
Add New Post /wp-admin/post-new.php1,533 ▲1423.06 ▼0.09663.60 ▲71.6256.81 ▲0.14
Media Library /wp-admin/upload.php1,385 ▼64.18 ▼0.00127.56 ▲26.8257.90 ▲13.03

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

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)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

custom-cart-page-notices-for-woocommerce/custom-cart-notices-wc.php 92% from 13 tests

The main PHP script in "Custom Cart Page Notices for WooCommerce" version 1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("custom-cart-page-notices-for-woocommerce.php" instead of "custom-cart-notices-wc.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 plugin92 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1352092

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin