90% products-purchase-price-for-woocommerce

Code Review | Products Purchase Price for WooCommerce

WordPress plugin Products Purchase Price for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: products-purchase...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-4.5
  • WordPress version: 6.3.1
  • First release: Dec 11, 2015
  • Latest release: Aug 5, 2016
  • Number of updates: 12
  • Update frequency: every 19.9 days
  • Top authors: Softedge (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /3,284 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.53ms] Passed 4 tests

Server-side resources used by Products Purchase Price for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0233.68 ▼5.15
Dashboard /wp-admin3.32 ▲0.0245.08 ▼3.10
Posts /wp-admin/edit.php3.37 ▲0.0248.61 ▲2.14
Add New Post /wp-admin/post-new.php5.90 ▲0.0293.21 ▼4.01
Media Library /wp-admin/upload.php3.24 ▲0.0237.44 ▲2.81

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Products Purchase Price for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.44 ▲0.061.51 ▼0.0839.39 ▼4.65
Dashboard /wp-admin2,206 ▲184.85 ▲0.01107.16 ▲4.6540.59 ▼3.93
Posts /wp-admin/edit.php2,089 ▼32.01 ▼0.0340.28 ▼0.3034.09 ▼0.59
Add New Post /wp-admin/post-new.php1,546 ▲1018.41 ▼4.88595.14 ▼26.3972.86 ▲18.06
Media Library /wp-admin/upload.php1,388 ▼04.17 ▼0.0894.91 ▼2.8644.09 ▲1.22

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • 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
Even though everything seems fine, this is not an exhaustive test

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: cost, price, woocommerce, custom field, buying-in...

products-purchase-price-for-woocommerce/woocommerce-purchase-price.php 92% from 13 tests

This is the main PHP file of "Products Purchase Price for WooCommerce" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("products-purchase-price-for-woocommerce.php" instead of "woocommerce-purchase-price.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin163 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP11938100
PO File15739
JavaScript19618
XML1206

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
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
There were not PNG files found in your plugin