89% oliver-pos-points-and-rewards

Code Review | Oliver POS - Points and Rewards for WooCommerce

WordPress plugin Oliver POS - Points and Rewards for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: oliver-pos-points...
  • Plugin version: 2.1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.2
  • WordPress version: 6.3.1
  • First release: Dec 7, 2020
  • Latest release: Nov 20, 2023
  • Number of updates: 5
  • Update frequency: every 226.0 days
  • Top authors: oliverpos (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /960 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
Install script ran successfully

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

Server-side resources used by Oliver POS - Points and Rewards for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.63 ▼3.10
Dashboard /wp-admin3.31 ▼0.0444.82 ▼13.02
Posts /wp-admin/edit.php3.36 ▲0.0046.21 ▲6.77
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.52 ▼14.02
Media Library /wp-admin/upload.php3.23 ▲0.0033.62 ▼1.33

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Oliver POS - Points and Rewards for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.14 ▼0.501.70 ▼0.0043.61 ▼0.36
Dashboard /wp-admin2,195 ▲155.60 ▼0.0386.67 ▼4.8041.99 ▼0.22
Posts /wp-admin/edit.php2,100 ▼31.99 ▼0.0235.78 ▼7.3736.40 ▼6.04
Add New Post /wp-admin/post-new.php1,526 ▼1923.08 ▼2.02588.21 ▼60.1651.54 ▼26.12
Media Library /wp-admin/upload.php1,394 ▼34.19 ▼0.0899.03 ▼5.3843.42 ▼1.07

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 detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% 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: Please take inspiration from this readme.txt

oliver-pos-points-and-rewards/oliver-pos-points-and-rewards.php 77% from 13 tests

The main PHP script in "Oliver POS - Points and Rewards for WooCommerce" version 2.1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.9" instead of "3.8")
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
There were no executable files found in this plugin1,235 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP61674011,231
JavaScript1014

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity16.60
▷ Minimum class complexity2.00
▷ Maximum class complexity42.00
Average method complexity3.23
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods35
▷ Static methods38.57%
▷ Public methods35100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.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
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
assets/img/oliver_icon_121.png3.08KB0.34KB▼ 88.91%