83% plot-prices

Code Review | Plot prices woocommerce product

WordPress plugin Plot prices woocommerce product scored83%from 54 tests.

About plugin

  • Plugin page: plot-prices
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.5.1
  • WordPress version: 6.3.1
  • First release: Dec 27, 2016
  • Latest release: Oct 10, 2020
  • Number of updates: 20
  • Update frequency: every 68.9 days
  • Top authors: behzadrohizadeh (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /2,634 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
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.70ms] Passed 4 tests

Analyzing server-side resources used by Plot prices woocommerce product
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0746.71 ▲6.75
Dashboard /wp-admin3.36 ▲0.0647.87 ▲2.44
Posts /wp-admin/edit.php3.42 ▲0.0648.67 ▼1.88
Add New Post /wp-admin/post-new.php5.95 ▲0.0694.06 ▼14.49
Media Library /wp-admin/upload.php3.29 ▲0.0537.87 ▲3.12

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Plot prices woocommerce product
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲14214.12 ▼0.1615.89 ▲14.1144.20 ▲4.49
Dashboard /wp-admin2,203 ▲155.83 ▲0.93112.45 ▼3.6439.26 ▼8.09
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.0336.17 ▼1.7334.58 ▲3.30
Add New Post /wp-admin/post-new.php1,533 ▲1423.02 ▼0.16681.49 ▲4.2181.82 ▲17.68
Media Library /wp-admin/upload.php1,391 ▲34.19 ▲0.01110.56 ▲9.4748.48 ▲4.36

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/plot-prices/chartprice.php:15

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 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Donate link: Please fix this invalid url: "free"
  • Screenshots: These screenshots do not have images: #1 (Plot in product), #2 (Settting)
The official readme.txt might help

plot-prices/chartprice.php 92% from 13 tests

The primary PHP file in "Plot prices woocommerce product" version 2.1 is used by WordPress to initiate all plugin functionality
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 ("plot-prices.php" instead of "chartprice.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin1,015 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2140653
PHP24919264
PO File2161862
CSS14336

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.47
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%
Functions10
▷ Named functions10100.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
2 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png23.12KB9.43KB▼ 59.19%
screenshot-1.png66.52KB29.77KB▼ 55.25%