83% product-purchase-notifications

Code Review | Product-Purchase-Notifications

WordPress plugin Product-Purchase-Notifications scored83%from 54 tests.

About plugin

  • Plugin page: product-purchase-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-5.9
  • WordPress version: 6.3.1
  • First release: May 26, 2022
  • Latest release: May 26, 2022
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: bitcraftx (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /276 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.14ms] Passed 4 tests

Server-side resources used by Product-Purchase-Notifications
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.15 ▼3.64
Dashboard /wp-admin3.31 ▲0.0144.88 ▼3.45
Posts /wp-admin/edit.php3.36 ▲0.0147.04 ▼4.59
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.95 ▼8.89
Media Library /wp-admin/upload.php3.23 ▲0.0036.21 ▲0.09
Notify Me Settings /wp-admin/options-general.php?page=notify_me3.0024.92

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 14 new options
New WordPress options
notify_color_text
widget_theysaidso_widget
notify_time
notify_color_shadow
db_upgraded
widget_recent-comments
notify_color_title
can_compress_scripts
notify_showOrHideName
theysaidso_admin_options
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Product-Purchase-Notifications
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.29 ▼1.101.63 ▼0.1140.66 ▼2.67
Dashboard /wp-admin2,206 ▲154.89 ▲0.01102.31 ▲1.1238.98 ▼5.32
Posts /wp-admin/edit.php2,092 ▲32.04 ▲0.0439.98 ▲1.4835.10 ▼0.33
Add New Post /wp-admin/post-new.php1,542 ▲1718.34 ▼4.72622.10 ▼57.5552.20 ▲1.71
Media Library /wp-admin/upload.php1,388 ▲34.21 ▼0.0395.20 ▼7.7640.09 ▼3.54
Notify Me Settings /wp-admin/options-general.php?page=notify_me280.440.094.06

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 14 options
    • widget_recent-comments
    • notify_positionOfTheBanner
    • theysaidso_admin_options
    • notify_color_text
    • notify_color_shadow
    • notify_color_title
    • widget_theysaidso_widget
    • db_upgraded
    • notify_toggle_img
    • can_compress_scripts
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
No output text or server-side errors detected on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=notify_me
    • > Network (severe)
    wp-admin/options-general.php?page=notify_me - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
Please fix the following attributes:
  • Donate link: Invalid url: "..."
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
You can look at the official readme.txt

product-purchase-notifications/Product-Purchase-Notifications.php 92% from 13 tests

The entry point to "Product-Purchase-Notifications" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("product-purchase-notifications.php" instead of "Product-Purchase-Notifications.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin637 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP23571346
CSS2242167
JavaScript2513124

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity18.50
▷ Minimum class complexity7.00
▷ Maximum class complexity30.00
Average method complexity2.84
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.33MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png79.39KB24.91KB▼ 68.63%
assets/banner-772x250.png68.19KB20.86KB▼ 69.41%
assets/icon-128x128.png12.96KB4.31KB▼ 66.75%
assets/screenshot-2.png145.93KB50.65KB▼ 65.29%
assets/icon-256x256.png28.76KB8.72KB▼ 69.69%