89% points-and-rewards-with-wc-blocks

Code Review | Points and Rewards with WooCommerce Blocks

WordPress plugin Points and Rewards with WooCommerce Blocks scored89%from 54 tests.

About plugin

  • Plugin page: points-and-reward...
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6
  • WordPress version: 6.3.1
  • First release: Dec 3, 2020
  • Latest release: Jan 28, 2021
  • Number of updates: 9
  • Update frequency: every 6.2 days
  • Top authors: theritesites (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /392 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Analyzing server-side resources used by Points and Rewards with WooCommerce Blocks
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.53 ▼4.45
Dashboard /wp-admin3.33 ▲0.0245.39 ▼1.90
Posts /wp-admin/edit.php3.38 ▲0.0246.41 ▼3.38
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.57 ▲0.67
Media Library /wp-admin/upload.php3.25 ▲0.0233.37 ▲0.64

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Points and Rewards with WooCommerce Blocks
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.66 ▼0.721.81 ▲0.2544.67 ▲5.23
Dashboard /wp-admin2,206 ▲155.84 ▼0.0697.63 ▼6.4638.13 ▼0.27
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.0239.53 ▲1.7334.22 ▲1.31
Add New Post /wp-admin/post-new.php1,535 ▼1223.30 ▲4.99609.20 ▼36.7155.11 ▲2.31
Media Library /wp-admin/upload.php1,382 ▼34.18 ▼0.0196.05 ▲1.2344.24 ▲2.73

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Requires php: Invalid plugin version format
The official readme.txt might help

points-and-rewards-with-wc-blocks/points-and-rewards-with-wc-blocks.php 92% from 13 tests

"Points and Rewards with WooCommerce Blocks" version 1.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 154 characters long)

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 detected79 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2317479

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.93
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods10
▷ Static methods110.00%
▷ Public methods880.00%
▷ Protected methods00.00%
▷ Private methods220.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin