10% kazooky-loyalty-rewards

Code Review | Kazooky Loyalty

WordPress plugin Kazooky Loyalty scored10%from 54 tests.

About plugin

  • Plugin page: kazooky-loyalty-r...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-3.7.1
  • WordPress version: 6.3.1
  • First release: Sep 17, 2012
  • Latest release: Dec 28, 2013
  • Number of updates: 35
  • Update frequency: every 13.4 days
  • Top authors: kazooky (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,411 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/kazooky-loyalty-rewards/kazooky_loyalty.php+46
    Trying to access array offset on value of type bool

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

An overview of server-side resources used by Kazooky Loyalty
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.61 ▲0.63
Dashboard /wp-admin3.33 ▲0.0243.86 ▼6.78
Posts /wp-admin/edit.php3.38 ▲0.0247.11 ▼6.34
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.83 ▼6.20
Media Library /wp-admin/upload.php3.25 ▲0.0233.82 ▼0.24

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
KazookyLoyalty
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Kazooky Loyalty
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8114.67 ▲0.371.85 ▲0.1245.06 ▼4.66
Dashboard /wp-admin2,222 ▲344.85 ▼1.03103.75 ▼9.5338.78 ▼2.73
Posts /wp-admin/edit.php2,105 ▲132.05 ▲0.0140.30 ▲4.4237.22 ▲4.17
Add New Post /wp-admin/post-new.php1,535 ▲223.66 ▲0.48586.79 ▼102.7950.01 ▼11.85
Media Library /wp-admin/upload.php1,404 ▲194.19 ▼0.0394.71 ▼7.5542.75 ▼7.20

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 were found after uninstall: 7 options
    • widget_recent-comments
    • db_upgraded
    • KazookyLoyalty
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/kazooky-loyalty-rewards/kazooky_loyalty.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kazooky-loyalty-rewards/kazooky_loyalty.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kazooky-loyalty-rewards/kazooky_loyalty.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bloginfo() in wp-content/plugins/kazooky-loyalty-rewards/kazooky_loyalty_settings_page.php:1
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/kazooky-loyalty-rewards/kazooky_loyalty.php on line 16

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === kazooky-loyalty-rewards === )
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Add images for these screenshots: #1 (**Your very own Social Rewards and Sharing Tool Bar**), #2 (**Mouse over the Red Gift box to see the details of your FREE promotion**), #3 (**The Rewards Screen that your visitors and users see on your website**), #4 (**This is an example of a typical activity graph you can view anytime. This), #5 (**Segment your visitors and market to them in a personalized way**), #6 (**Promote your products and offers with exciting Promo Pages**), #7 (**Real Time Data and Analytics to maximize your engagement**), #8 (**Make the bar your bar and integrate into your website how you see fit**), #9 (**This is your quick stats and traffic reporting we provide you with**)
The official readme.txt is a good inspiration

kazooky-loyalty-rewards/index.php 92% from 13 tests

The main PHP script in "Kazooky Loyalty" version 2.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("kazooky-loyalty-rewards.php" instead of "index.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
Success! There were no dangerous files found in this plugin369 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3519170
CSS1110153
JavaScript111346

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.11MB with 0.06MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png68.76KB22.75KB▼ 66.91%
wordpress-logo-hoz-rgb.png8.95KB4.70KB▼ 47.49%
kazooky.png2.79KB1.70KB▼ 39.17%
screenshot-1.png31.38KB10.97KB▼ 65.06%