89% offerwhere-for-woocommerce

Code Review | Offerwhere Points, Rewards & Loyalty Programs for WooCommerce

WordPress plugin Offerwhere Points, Rewards & Loyalty Programs for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: offerwhere-for-wo...
  • Plugin version: 2.3.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.1
  • WordPress version: 6.3.1
  • First release: Oct 27, 2021
  • Latest release: Feb 25, 2023
  • Number of updates: 21
  • Update frequency: every 23.3 days
  • Top authors: offerwhere (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /613 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
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼3.79ms] Passed 4 tests

Server-side resources used by Offerwhere Points, Rewards & Loyalty Programs for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.2940.47 ▲0.85
Dashboard /wp-admin3.41 ▲0.1051.04 ▼2.59
Posts /wp-admin/edit.php3.52 ▲0.1755.85 ▲8.18
Add New Post /wp-admin/post-new.php5.99 ▲0.1085.93 ▼14.02
Media Library /wp-admin/upload.php3.33 ▲0.1038.66 ▲0.61
Offerwhere /wp-admin/options-general.php?page=offerwhere-settings3.3033.81

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Offerwhere Points, Rewards & Loyalty Programs for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲3714.74 ▲0.151.70 ▼0.4840.85 ▼2.06
Dashboard /wp-admin2,232 ▲264.83 ▼0.05102.78 ▼0.5538.45 ▼8.57
Posts /wp-admin/edit.php2,106 ▲62.00 ▼0.0136.77 ▼2.4234.73 ▼3.01
Add New Post /wp-admin/post-new.php1,556 ▲1223.21 ▲4.78678.64 ▲21.4568.25 ▲11.78
Media Library /wp-admin/upload.php1,408 ▲84.34 ▲0.1298.42 ▼3.8540.72 ▼3.41
Offerwhere /wp-admin/options-general.php?page=offerwhere-settings8262.0624.4527.37

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
6 plugin tags: points and rewards, points program, reward program, woocommerce, loyalty program...

offerwhere-for-woocommerce/offerwhere-woocommerce.php 85% from 13 tests

This is the main PHP file of "Offerwhere Points, Rewards & Loyalty Programs for WooCommerce" version 2.3.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("offerwhere-for-woocommerce.php" instead of "offerwhere-woocommerce.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 162 characters long)

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
Good job! No executable or dangerous file extensions detected598 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP76518598

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.38
Average class complexity12.60
▷ Minimum class complexity1.00
▷ Maximum class complexity33.00
Average method complexity2.49
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods39
▷ Static methods39100.00%
▷ Public methods3282.05%
▷ Protected methods00.00%
▷ Private methods717.95%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants29
▷ Global constants13.45%
▷ Class constants2896.55%
▷ Public constants28100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin