94% achievement-shortcode-for-badgeos

Code Review | Achievement Shortcode Add-On for BadgeOS

WordPress plugin Achievement Shortcode Add-On for BadgeOS scored 94% from 54 tests.

About plugin

  • Plugin page: achievement-short...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.5.9+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-5.5.3
  • WordPress version: 5.9.2
  • First release: Jun 2, 2016
  • Latest release: Nov 26, 2020
  • Number of updates: 25
  • Update frequency: every 65.5 days
  • Top authors: konnektiv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,545 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Server-side resources used by Achievement Shortcode Add-On for BadgeOS
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.4056.98 ▲32.22
Dashboard /wp-admin3.41 ▲0.0066.51 ▲34.42
Posts /wp-admin/edit.php3.65 ▲0.0035.17 ▼1.65
Add New Post /wp-admin/post-new.php6.88 ▼0.09278.16 ▼1,012.05
Media Library /wp-admin/upload.php3.30 ▲0.0060.35 ▲27.95

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Achievement Shortcode Add-On for BadgeOS
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,810 ▲5515.58 ▲0.815.83 ▲0.122.29 ▼0.10
Dashboard /wp-admin2,888 ▲275.98 ▼0.19118.47 ▼19.10176.01 ▲12.57
Posts /wp-admin/edit.php2,691 ▼03.22 ▼0.0263.09 ▼1.79141.55 ▼71.01
Add New Post /wp-admin/post-new.php1,773 ▲11221.05 ▲4.29439.48 ▲20.27160.31 ▼30.69
Media Library /wp-admin/upload.php1,698 ▼05.58 ▲0.05144.88 ▲1.15209.92 ▲7.51

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/achievement-shortcode-for-badgeos/badgeos-achievement-shortcode.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (23 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

achievement-shortcode-for-badgeos/badgeos-achievement-shortcode.php 92% from 13 tests

"Achievement Shortcode Add-On for BadgeOS" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("achievement-shortcode-for-badgeos.php" instead of "badgeos-achievement-shortcode.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected440 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
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity3.43
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods7100.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
There were not PNG files found in your plugin