93% achievement-shortcode-add-on-for-gamipress

Code Review | Achievement Shortcode Add-On for GamiPress

WordPress plugin Achievement Shortcode Add-On for GamiPress scored 93% from 54 tests.

About plugin

  • Plugin page: achievement-short...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.5.9+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.5.1
  • WordPress version: 5.9.2
  • First release: Oct 29, 2020
  • Latest release: Oct 29, 2020
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: konnektiv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 298 total downloads

Benchmarks

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
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Achievement Shortcode Add-On for GamiPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0157.42 ▲7.39
Dashboard /wp-admin3.41 ▲0.0033.62 ▼0.27
Posts /wp-admin/edit.php3.65 ▲0.0038.94 ▲0.06
Add New Post /wp-admin/post-new.php6.89 ▼0.08105.94 ▼1,157.85
Media Library /wp-admin/upload.php3.30 ▼0.0124.08 ▼6.78

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Achievement Shortcode Add-On for GamiPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,774 ▲3015.63 ▲0.055.79 ▲0.002.10 ▼0.22
Dashboard /wp-admin2,895 ▲346.11 ▲0.07120.59 ▼19.08157.17 ▼8.68
Posts /wp-admin/edit.php2,694 ▼03.24 ▲0.0160.90 ▼1.70138.29 ▲1.87
Add New Post /wp-admin/post-new.php1,758 ▼2322.17 ▼0.64457.70 ▲34.17162.01 ▲5.91
Media Library /wp-admin/upload.php1,698 ▼05.45 ▼0.04142.83 ▼5.33188.75 ▼0.34

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 short smoke test looking 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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/achievement-shortcode-add-on-for-gamipress/gamipress-achievement-shortcode.php:34

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 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (23 tag instead of maximum 10)
Please take inspiration from this readme.txt

achievement-shortcode-add-on-for-gamipress/gamipress-achievement-shortcode.php 85% from 13 tests

"Achievement Shortcode Add-On for GamiPress" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("achievement-shortcode-add-on-for-gamipress.php" instead of "gamipress-achievement-shortcode.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected452 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript28853339
PHP12749103
JSON10010

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity3.57
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin