93% woo-free-pricing

Code Review | WooCommerce Free Pricing

WordPress plugin WooCommerce Free Pricing scored 93% from 54 tests.

About plugin

  • Plugin page: woo-free-pricing
  • Plugin version: 0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.0.3
  • WordPress version: 5.8.1
  • First release: Jan 24, 2019
  • Latest release: Jan 24, 2019
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: rynmdk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 276 total downloads

Benchmarks

Plugin footprint Passed 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.00MB] [CPU: ▼141.23ms] Passed 4 tests

An overview of server-side resources used by WooCommerce Free Pricing
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1235.22 ▲15.67
Dashboard /wp-admin3.06 ▲0.0146.92 ▲1.49
Posts /wp-admin/edit.php3.11 ▲0.0143.40 ▼1.93
Add New Post /wp-admin/post-new.php5.42 ▼0.0190.77 ▼560.89
Media Library /wp-admin/upload.php3.01 ▲0.0032.30 ▼3.57

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Free Pricing
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.93 ▲0.3510.24 ▲0.2944.51 ▼6.04
Dashboard /wp-admin2,973 ▲395.87 ▼0.11141.33 ▲2.36114.50 ▲10.93
Posts /wp-admin/edit.php2,739 ▼02.70 ▼0.0069.32 ▲4.6588.21 ▼3.34
Add New Post /wp-admin/post-new.php1,672 ▼1318.81 ▼0.35391.61 ▲6.91106.78 ▲0.29
Media Library /wp-admin/upload.php1,807 ▼35.09 ▲0.08147.28 ▼1.13121.11 ▲5.11

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-free-pricing/WoocommerceFreePricing.php:14

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% 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:
  • Plugin Name: Please specify the plugin name on the first line ( === woo-free-pricing === )
  • Screenshots: Screenshot #1 (Screenshot.png) image required
  • Contributors: Plugin contributors not specified
You can take inspiration from this readme.txt

woo-free-pricing/WoocommerceFreePricing.php 92% from 13 tests

The main PHP file in "WooCommerce Free Pricing" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-free-pricing.php" instead of "WoocommerceFreePricing.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin8 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1698

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.67
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%
Functions1
▷ Named functions1100.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
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
Screenshot.png61.97KB24.48KB▼ 60.49%