90% price-offerings-for-woocommerce

Code Review | Price Offers for WooCommerce

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

About plugin

  • Plugin page: price-offerings-f...
  • Plugin version: 2.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.4
  • WordPress version: 6.3.1
  • First release: Jan 6, 2020
  • Latest release: Nov 15, 2023
  • Number of updates: 23
  • Update frequency: every 61.3 days
  • Top authors: wpcodefactory (52.17%)algoritmika (52.17%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /3,586 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Price Offers for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.22 ▼1.58
Dashboard /wp-admin3.31 ▲0.0142.65 ▼3.70
Posts /wp-admin/edit.php3.36 ▲0.0046.21 ▲1.49
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.42 ▼16.32
Media Library /wp-admin/upload.php3.23 ▲0.0032.69 ▼1.11

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Price Offers for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.74 ▲0.611.79 ▼0.0643.45 ▲1.74
Dashboard /wp-admin2,195 ▲175.58 ▼0.1494.74 ▼17.8440.35 ▼2.59
Posts /wp-admin/edit.php2,100 ▼31.97 ▲0.0041.26 ▲1.4136.94 ▲0.18
Add New Post /wp-admin/post-new.php1,526 ▼023.16 ▲0.01657.80 ▼36.9759.22 ▼5.10
Media Library /wp-admin/upload.php1,403 ▼04.21 ▲0.0999.18 ▼19.7144.26 ▲0.18

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: offerings, offers, woocommerce, negotiations, price...

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

This is the main PHP file of "Price Offers for WooCommerce" version 2.4.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
67 characters long description:
Allows your customers to start product price negotiations with you.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin2,471 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP194251,2352,384
CSS281454
JavaScript2144433

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity13.94
▷ Minimum class complexity1.00
▷ Maximum class complexity54.00
Average method complexity2.65
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes15.56%
Methods137
▷ Static methods118.03%
▷ Public methods137100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants3
▷ Global constants3100.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