94% store-notification

Code Review | Store Notification | Show Discount Deal, Timer, Notification for your WordPress Store

WordPress plugin Store Notification | Show Discount Deal, Timer, Notification for your WordPress Store scored 94% from 54 tests.

About plugin

  • Plugin page: store-notification
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.2.2
  • WordPress version: 5.8.1
  • First release: Jun 30, 2019
  • Latest release: Jun 30, 2019
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: mantrabrain (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 315 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▼141.22ms] Passed 4 tests

Analyzing server-side resources used by Store Notification | Show Discount Deal, Timer, Notification for your WordPress Store
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.94 ▲0.2237.32 ▲5.16
Dashboard /wp-admin3.15 ▲0.0945.00 ▼5.61
Posts /wp-admin/edit.php3.26 ▲0.1444.32 ▼11.85
Add New Post /wp-admin/post-new.php5.51 ▲0.0798.87 ▼548.75
Media Library /wp-admin/upload.php3.09 ▲0.0936.80 ▲1.34
Store Notification /wp-admin/options-general.php?page=store-notification3.1833.67

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 26 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Store Notification | Show Discount Deal, Timer, Notification for your WordPress Store: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,039 ▲41716.65 ▲0.7117.70 ▲7.6264.18 ▲15.12
Dashboard /wp-admin3,016 ▲796.92 ▲0.98146.78 ▼21.93117.54 ▲1.85
Posts /wp-admin/edit.php2,784 ▲453.15 ▲0.3369.86 ▲2.32122.61 ▲25.33
Add New Post /wp-admin/post-new.php1,701 ▲11018.73 ▼0.08384.19 ▼3.24122.67 ▲8.56
Media Library /wp-admin/upload.php1,852 ▲455.43 ▲0.42143.19 ▼14.02121.45 ▲1.61
Store Notification /wp-admin/options-general.php?page=store-notification1,7222.9792.0893.94

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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 take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/store-notification/includes/admin/class-store-notification-admin-assets.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/store-notification/includes/class-store-notification-assets.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: discount, wc, ecommerce, store, edd...

store-notification/store-notification.php 92% from 13 tests

The main file in "Store Notification | Show Discount Deal, Timer, Notification for your WordPress Store" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 232 characters long)

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
Everything looks great! No dangerous files found in this plugin1,532 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP174165291,347
CSS1240116
JavaScript228169

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity16.45
▷ Minimum class complexity1.00
▷ Maximum class complexity113.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes19.09%
▷ Concrete classes1090.91%
▷ Final classes440.00%
Methods72
▷ Static methods1723.61%
▷ Public methods5981.94%
▷ Protected methods00.00%
▷ Private methods1318.06%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected