90% price-robot-for-woocommerce

Code Review | Price Robot for WooCommerce

WordPress plugin Price Robot for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: price-robot-for-w...
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 30, 2015
  • Latest release: Sep 26, 2023
  • Number of updates: 19
  • Update frequency: every 154.0 days
  • Top authors: algoritmika (84.21%)wpcodefactory (21.05%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,763 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Price Robot for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0136.51 ▼0.00
Dashboard /wp-admin3.32 ▲0.0243.53 ▼6.22
Posts /wp-admin/edit.php3.37 ▲0.0146.94 ▲3.59
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.35 ▼11.31
Media Library /wp-admin/upload.php3.24 ▲0.0131.53 ▼0.67

Server storage [IO: ▲0.09MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

An overview of browser requirements for Price Robot for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.72 ▲0.331.66 ▼0.1542.74 ▲3.53
Dashboard /wp-admin2,198 ▲205.54 ▼0.0882.39 ▼28.1440.20 ▼5.63
Posts /wp-admin/edit.php2,100 ▼32.03 ▲0.0439.70 ▲2.6836.94 ▲4.09
Add New Post /wp-admin/post-new.php1,526 ▼223.17 ▲0.24590.66 ▼69.0462.78 ▲3.50
Media Library /wp-admin/upload.php1,400 ▼04.22 ▼0.0093.81 ▼10.9441.19 ▼6.13

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Plugin admin area - WooCommerce > Settings > Price Robot.), #2 (Plugin admin area - WooCommerce > Products.)
You can take inspiration from this readme.txt

price-robot-for-woocommerce/price-robot-for-woocommerce.php Passed 13 tests

The primary PHP file in "Price Robot for WooCommerce" version 1.3.2 is used by WordPress to initiate all plugin functionality
64 characters long description:
The plugin calculates optimal price for products in WooCommerce.

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
No dangerous file extensions were detected1,211 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP132427411,211

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity14.00
▷ Minimum class complexity1.00
▷ Maximum class complexity53.00
Average method complexity2.98
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes17.14%
Methods92
▷ Static methods11.09%
▷ Public methods92100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG files were detected