89% drop-prices-for-woocommerce

Code Review | Drop / Raise Price for WooCommerce (over time)

WordPress plugin Drop / Raise Price for WooCommerce (over time) scored89%from 54 tests.

About plugin

  • Plugin page: drop-prices-for-w...
  • Plugin version: 1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: May 12, 2021
  • Latest release: Oct 24, 2023
  • Number of updates: 21
  • Update frequency: every 42.7 days
  • Top authors: wpgenie2 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,246 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
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Drop / Raise Price for WooCommerce (over time)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.67 ▼0.60
Dashboard /wp-admin3.31 ▼0.0440.69 ▼17.46
Posts /wp-admin/edit.php3.36 ▲0.0045.24 ▲2.42
Add New Post /wp-admin/post-new.php5.89 ▲0.0076.24 ▼10.64
Media Library /wp-admin/upload.php3.23 ▲0.0032.86 ▼0.54

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Drop / Raise Price for WooCommerce (over time)
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.35 ▼0.001.71 ▲0.1543.69 ▲4.42
Dashboard /wp-admin2,198 ▲185.59 ▼0.0392.79 ▲4.1242.08 ▲1.65
Posts /wp-admin/edit.php2,103 ▲32.01 ▲0.0540.78 ▲3.3135.20 ▼0.35
Add New Post /wp-admin/post-new.php1,526 ▼323.04 ▼0.33653.53 ▼10.1748.57 ▼21.31
Media Library /wp-admin/upload.php1,403 ▲34.22 ▲0.0396.04 ▲1.4641.63 ▼4.39

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

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

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: woocommerce raise price, drop price, drop raise price, raise price, woocommerce...

drop-prices-for-woocommerce/woocommerce-drop-prices.php 85% from 13 tests

The principal PHP file in "Drop / Raise Price for WooCommerce (over time)" v. 1.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("drop-prices-for-woocommerce.php" instead of "woocommerce-drop-prices.php")
  • Text Domain: Please use dashes and lowercase characters for text domains

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
Success! There were no dangerous files found in this plugin3,138 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript62464472,344
PHP1139164692
CSS232102

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity151.00
▷ Minimum class complexity151.00
▷ Maximum class complexity151.00
Average method complexity8.14
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
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