84% woo-price-drop-alert

Code Review | Price Drop Alert for Woo Commerce

WordPress plugin Price Drop Alert for Woo Commerce scored84%from 54 tests.

About plugin

  • Plugin page: woo-price-drop-alert
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.3.2
  • WordPress version: 6.3.1
  • First release: Jan 4, 2020
  • Latest release: Jan 8, 2020
  • Number of updates: 9
  • Update frequency: every 0.6 days
  • Top authors: joshiniket14outlook (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /661 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▲0.16ms] Passed 4 tests

Analyzing server-side resources used by Price Drop Alert for Woo Commerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0050.15 ▲10.87
Dashboard /wp-admin3.31 ▲0.0051.06 ▼2.71
Posts /wp-admin/edit.php3.36 ▲0.0052.28 ▲4.11
Add New Post /wp-admin/post-new.php5.89 ▲0.00103.31 ▲0.03
Media Library /wp-admin/upload.php3.23 ▲0.0037.53 ▼0.81

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Price Drop Alert for Woo Commerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.131.97 ▲0.1744.59 ▲0.97
Dashboard /wp-admin2,195 ▲155.58 ▼0.0592.11 ▲2.2742.44 ▼2.34
Posts /wp-admin/edit.php2,103 ▲32.00 ▼0.0336.24 ▼1.5733.22 ▼3.83
Add New Post /wp-admin/post-new.php1,526 ▼023.66 ▲0.48664.82 ▲22.1059.54 ▼8.06
Media Library /wp-admin/upload.php1,400 ▼04.15 ▼0.0294.57 ▼15.7047.14 ▼1.01

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/woo-price-drop-alert/woo-price-drop-alert.php:46

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Requires php: Invalid version format
The official readme.txt might help

woo-price-drop-alert/woo-price-drop-alert.php Passed 13 tests

This is the main PHP file of "Price Drop Alert for Woo Commerce" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
86 characters long description:
User will notify via email if user's selected product price get down by current price.

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
Success! There were no dangerous files found in this plugin189 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP21423155
JavaScript12128
CSS1006

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected