93% award-on-click-add-on-for-badgeos

Code Review | Award On Click Add-On for BadgeOS

WordPress plugin Award On Click Add-On for BadgeOS scored 93% from 54 tests.

About plugin

  • Plugin page: award-on-click-ad...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.5.9+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.3
  • WordPress version: 5.8.1
  • First release: Nov 26, 2020
  • Latest release: Nov 26, 2020
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: konnektiv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 133 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Award On Click Add-On for BadgeOS
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0035.03 ▼0.04
Dashboard /wp-admin3.06 ▲0.0052.00 ▲5.19
Posts /wp-admin/edit.php3.11 ▼0.0147.53 ▼5.89
Add New Post /wp-admin/post-new.php5.42 ▼0.0290.75 ▼557.26
Media Library /wp-admin/upload.php3.01 ▲0.0034.87 ▼0.31

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Award On Click Add-On for BadgeOS: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,688 ▲5116.26 ▲0.6211.83 ▼1.3544.41 ▼5.29
Dashboard /wp-admin2,969 ▲355.92 ▼0.07143.55 ▼4.70110.65 ▲0.93
Posts /wp-admin/edit.php2,739 ▼02.72 ▼0.1262.44 ▼1.8396.19 ▲3.52
Add New Post /wp-admin/post-new.php1,672 ▼018.75 ▼0.12362.24 ▼15.14109.42 ▼2.50
Media Library /wp-admin/upload.php1,807 ▼05.05 ▲0.03156.63 ▲9.44125.58 ▲4.89

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/award-on-click-add-on-for-badgeos/badgeos-award-on-click.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Too many tags (23 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

award-on-click-add-on-for-badgeos/badgeos-award-on-click.php 85% from 13 tests

The entry point to "Award On Click Add-On for BadgeOS" version 1.1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("award-on-click-add-on-for-badgeos.php" instead of "badgeos-award-on-click.php")
  • 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 a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin487 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ 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
PNG images were not found in this plugin