79% easy-loyalty-points-and-rewards-for-woocommerce

Code Review | Easy Loyalty Points and Rewards for WooCommerce

WordPress plugin Easy Loyalty Points and Rewards for WooCommerce scored79%from 54 tests.

About plugin

  • Plugin page: easy-loyalty-poin...
  • Plugin version: 1.4.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.1
  • WordPress version: 6.3.1
  • First release: Nov 23, 2021
  • Latest release: Jan 12, 2023
  • Number of updates: 16
  • Update frequency: every 26.6 days
  • Top authors: nujoplugins (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

500+ active /3,493 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Easy Loyalty Points and Rewards for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.31 ▲2.58
Dashboard /wp-admin3.31 ▲0.0147.58 ▲6.37
Posts /wp-admin/edit.php3.36 ▲0.0142.48 ▼8.40
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.31 ▼3.08
Media Library /wp-admin/upload.php3.23 ▲0.0034.31 ▲0.01

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Easy Loyalty Points and Rewards for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.414.72 ▲2.8543.57 ▲1.24
Dashboard /wp-admin2,206 ▲174.84 ▼0.09103.85 ▼19.1143.24 ▲0.59
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.1234.11 ▼4.9632.50 ▼2.05
Add New Post /wp-admin/post-new.php1,533 ▼223.23 ▲0.03640.28 ▼60.3453.62 ▲0.50
Media Library /wp-admin/upload.php1,388 ▼34.20 ▼0.0593.14 ▼7.2644.03 ▲1.68

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/easy-loyalty-points-and-rewards-for-woocommerce/public/partials/nujo-reward-points-public-display.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Nujo_Reward_Points_WP_List_Table' not found in wp-content/plugins/easy-loyalty-points-and-rewards-for-woocommerce/includes/class-nujo-reward-points-account-table.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Nujo_Reward_Points_WP_List_Table' not found in wp-content/plugins/easy-loyalty-points-and-rewards-for-woocommerce/includes/class-nujo-reward-points-log-table.php:3

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: woocommerce, rewards, discounts, free, points and rewards...

easy-loyalty-points-and-rewards-for-woocommerce/easy-loyalty-points-and-rewards-for-woocommerce.php Passed 13 tests

The primary PHP file in "Easy Loyalty Points and Rewards for WooCommerce" version 1.4.0 is used by WordPress to initiate all plugin functionality
71 characters long description:
Increase WooCommerce customer loyalty with a points and rewards system.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected3,743 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP238291,5103,588
CSS220878
JavaScript216064
XML10013

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity23.07
▷ Minimum class complexity1.00
▷ Maximum class complexity131.00
Average method complexity2.98
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods167
▷ Static methods3319.76%
▷ Public methods12071.86%
▷ Protected methods2112.57%
▷ Private methods2615.57%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/img/nujoplugins_logo_dark_plugin.png1.79KB0.65KB▼ 63.57%