78% et-woo-product-price

Code Review | Et-woo-product-price

WordPress plugin Et-woo-product-price scored78%from 54 tests.

About plugin

  • Plugin page: et-woo-product-price
  • Plugin version: 1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.2
  • WordPress version: 6.3.1
  • First release: Dec 26, 2019
  • Latest release: Jan 20, 2020
  • Number of updates: 6
  • Update frequency: every 4.8 days
  • Top authors: huonggiang (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /418 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
Install script ran successfully

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

A check of server-side resources used by Et-woo-product-price
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0133.95 ▼8.61
Dashboard /wp-admin3.31 ▲0.0141.82 ▼8.78
Posts /wp-admin/edit.php3.36 ▲0.0146.89 ▲1.51
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.91 ▼3.39
Media Library /wp-admin/upload.php3.23 ▲0.0136.26 ▲1.93

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
widget_recent-posts
pricelist_header
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
facebook_chat
pricelist_logo
db_upgraded

Browser metrics Passed 4 tests

Et-woo-product-price: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.73 ▼1.021.65 ▼0.0740.36 ▼4.97
Dashboard /wp-admin2,206 ▲184.88 ▼1.03114.64 ▲1.4441.77 ▼2.24
Posts /wp-admin/edit.php2,092 ▼01.99 ▼0.0139.57 ▲1.8837.43 ▲3.57
Add New Post /wp-admin/post-new.php1,547 ▲1418.21 ▼5.09605.91 ▼74.2977.21 ▲23.09
Media Library /wp-admin/upload.php1,391 ▲64.15 ▼0.07102.61 ▼3.3941.92 ▼1.30

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 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
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/et-woo-product-price/template/productprice.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/et-woo-product-price/et-woo-product-price.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/et-woo-product-price/views/productprice_admin.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (http://easytech.vn/wp-content/uploads/2019/12/woo_product-1024x574.png) image required
You can look at the official readme.txt

et-woo-product-price/et-woo-product-price.php Passed 13 tests

The principal PHP file in "Et-woo-product-price" v. 1.2 is loaded by WordPress automatically on each request
77 characters long description:
This plugin displays a table of products and their prices group by categories

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin730 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP323944730

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.30
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin