10% woo-your-custom-coupon-notices-lite

Code Review | Woo Your Custom Coupon Notices Lite

WordPress plugin Woo Your Custom Coupon Notices Lite scored 10% from 54 tests.

About plugin

  • Plugin page: woo-your-custom-c...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.1
  • WordPress version: 6.3.1
  • First release: Jan 13, 2017
  • Latest release: Jan 24, 2017
  • Number of updates: 13
  • Update frequency: every 0.6 days
  • Top authors: mstemberg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 390 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/woo-your-custom-coupon-notices-lite/custom_notices.php+58
    Use of undefined constant DIR_PATH - assumed 'DIR_PATH' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.81MB] [CPU: ▼52.79ms] Passed 4 tests

An overview of server-side resources used by Woo Your Custom Coupon Notices Lite
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.18 ▼1.287.76 ▼31.51
Dashboard /wp-admin2.20 ▼1.107.76 ▼43.74
Posts /wp-admin/edit.php2.20 ▼1.167.01 ▼38.31
Add New Post /wp-admin/post-new.php2.20 ▼3.696.72 ▼97.59
Media Library /wp-admin/upload.php2.20 ▼1.036.50 ▼30.13

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
your_notices_options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woo Your Custom Coupon Notices Lite
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲8013.26 ▼0.901.80 ▲0.1041.71 ▼0.88
Dashboard /wp-admin2,214 ▲235.83 ▼0.0597.30 ▼7.3337.93 ▼1.89
Posts /wp-admin/edit.php2,100 ▲112.02 ▲0.0234.75 ▲1.7736.09 ▲0.88
Add New Post /wp-admin/post-new.php1,525 ▼817.38 ▼5.81605.76 ▼94.9449.61 ▼8.05
Media Library /wp-admin/upload.php1,402 ▲144.22 ▲0.0298.10 ▼13.5742.66 ▼6.71

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the customnoticesStylesheet handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • your_notices_options
    • widget_recent-posts
    • widget_recent-comments

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

SRP 50% from 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
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/woo-your-custom-coupon-notices-lite/custom_notices.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues 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
5 plugin tags: coupon, customize, woocommerce, messages, notices

woo-your-custom-coupon-notices-lite/custom_notices.php 92% from 13 tests

The main PHP script in "Woo Your Custom Coupon Notices Lite" version 1.4 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-your-custom-coupon-notices-lite.php" instead of "custom_notices.php")

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
There were no executable files found in this plugin533 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP113817405
PO File1181888
CSS18040

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity59.00
▷ Minimum class complexity59.00
▷ Maximum class complexity59.00
Average method complexity4.62
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods16100.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.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