89% woo-price-rate

Code Review | WooCommerce Price Rate

WordPress plugin WooCommerce Price Rate scored89%from 54 tests.

About plugin

  • Plugin page: woo-price-rate
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2-5.0.2
  • WordPress version: 6.3.1
  • First release: Jan 7, 2019
  • Latest release: Jan 7, 2019
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: abdallah.nofal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /466 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.02MB] [CPU: ▲1.11ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Price Rate
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.0245.06 ▼0.32
Dashboard /wp-admin3.59 ▲0.0272.27 ▲17.05
Posts /wp-admin/edit.php3.70 ▲0.0253.46 ▼0.97
Add New Post /wp-admin/post-new.php6.17 ▲0.02100.48 ▲4.37
Media Library /wp-admin/upload.php3.51 ▲0.0239.23 ▲1.36

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Price Rate
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲4214.29 ▲0.121.66 ▼0.0839.29 ▼4.58
Dashboard /wp-admin2,212 ▲325.67 ▼0.0391.31 ▼6.1740.48 ▼4.65
Posts /wp-admin/edit.php2,118 ▲182.02 ▲0.0041.68 ▲5.8437.34 ▲2.44
Add New Post /wp-admin/post-new.php1,565 ▲3123.05 ▼0.14660.51 ▼25.8562.50 ▲5.73
Media Library /wp-admin/upload.php1,414 ▲144.26 ▲0.06100.03 ▼10.4743.51 ▼2.50

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
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 just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: woocommerce, percentage, price, rate

woo-price-rate/woocommerce-price-rate.php 77% from 13 tests

This is the main PHP file of "WooCommerce Price Rate" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-price-rate.php" instead of "woocommerce-price-rate.php")
  • Requires at least: Required version must match the one declared in readme.txt ("4.6" instead of "2.2")

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
Good job! No executable or dangerous file extensions detected115 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12961108
Markdown1107

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin