83% poket-rewards-for-woocommerce

Code Review | Poket Rewards for WooCommerce

WordPress plugin Poket Rewards for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: poket-rewards-for...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-6.0
  • WordPress version: 6.3.1
  • First release: May 4, 2021
  • Latest release: Sep 8, 2022
  • Number of updates: 26
  • Update frequency: every 18.9 days
  • Top authors: poketadmin78 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /570 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼10.91ms] Passed 4 tests

Analyzing server-side resources used by Poket Rewards for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.191,179.10 ▲1,141.49
Dashboard /wp-admin3.40 ▲0.0645.75 ▼19.33
Posts /wp-admin/edit.php3.45 ▲0.1042.91 ▼2.86
Add New Post /wp-admin/post-new.php5.98 ▲0.1080.39 ▼19.69
Media Library /wp-admin/upload.php3.33 ▲0.1034.31 ▼1.75

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Poket Rewards for WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲9114.71 ▲0.172.11 ▲0.4640.87 ▼0.43
Dashboard /wp-admin2,206 ▲175.84 ▲0.8994.28 ▼12.7243.32 ▲2.96
Posts /wp-admin/edit.php2,089 ▲32.01 ▼0.0137.09 ▼0.5429.67 ▼3.42
Add New Post /wp-admin/post-new.php1,514 ▼023.42 ▲5.83615.74 ▼66.3858.78 ▲7.61
Media Library /wp-admin/upload.php1,391 ▲34.22 ▼0.0294.76 ▼15.7340.18 ▼6.65

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/poket-rewards-for-woocommerce/Poket_Rewards_for_WooCommerce.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)
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === poket-rewards-for-woocommerce === )
  • Screenshots: Please describe screenshot #8 in poket-rewards-for-woocommerce/assets to your readme.txt
You can look at the official readme.txt

poket-rewards-for-woocommerce/Poket_Rewards_for_WooCommerce.php 85% from 13 tests

"Poket Rewards for WooCommerce" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("poket-rewards-for-woocommerce.php" instead of "Poket_Rewards_for_WooCommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin824 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP134521821
SVG1003

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.05
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%
Functions15
▷ Named functions15100.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
No PNG images were found in this plugin