84% badgeos-badgestack-add-on

Code Review | BadgeOS BadgeStack Add-on

WordPress plugin BadgeOS BadgeStack Add-on scored84%from 54 tests.

About plugin

  • Plugin page: badgeos-badgestac...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.9.3
  • WordPress version: 6.3.1
  • First release: Apr 9, 2013
  • Latest release: May 23, 2022
  • Number of updates: 11
  • Update frequency: every 303.2 days
  • Top authors: credly (63.64%)learningtimes (36.36%)tw2113 (18.18%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active /11,674 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.00MB] [CPU: ▼3.79ms] Passed 4 tests

A check of server-side resources used by BadgeOS BadgeStack Add-on
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.70 ▼5.74
Dashboard /wp-admin3.31 ▲0.0043.42 ▼0.52
Posts /wp-admin/edit.php3.36 ▲0.0047.33 ▲1.07
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.12 ▼9.98
Media Library /wp-admin/upload.php3.23 ▲0.0034.91 ▲1.37

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for BadgeOS BadgeStack Add-on
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6113.13 ▼1.454.23 ▲2.2441.54 ▼3.62
Dashboard /wp-admin2,200 ▲95.84 ▲0.96102.89 ▼3.2538.41 ▼3.68
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0141.18 ▲4.8935.35 ▲0.92
Add New Post /wp-admin/post-new.php1,519 ▼1423.29 ▲0.34668.15 ▼19.4070.94 ▲16.80
Media Library /wp-admin/upload.php1,388 ▼34.25 ▲0.0894.25 ▼4.0643.04 ▼1.93

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 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/badgeos-badgestack-add-on/badgeos-badgestack.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

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
Attributes that require attention:
  • Tags: Too many tags (18 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

badgeos-badgestack-add-on/badgeos-badgestack.php 92% from 13 tests

The primary PHP file in "BadgeOS BadgeStack Add-on" version 1.0.3 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("badgeos-badgestack-add-on.php" instead of "badgeos-badgestack.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
No dangerous file extensions were detected1,511 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PO File1328459978
PHP162140533

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods10
▷ Static methods110.00%
▷ Public methods550.00%
▷ Protected methods00.00%
▷ Private methods550.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

PNG files should be compressed to save space and minimize bandwidth usage
14 PNG files occupy 0.40MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/badge-badgeexplorer-pink.png21.31KB7.73KB▼ 63.73%
images/community-badge-activist.png19.82KB6.95KB▼ 64.93%
images/community-badge-activelearner.png20.28KB7.21KB▼ 64.44%
images/community-badge-commentator.png19.29KB7.00KB▼ 63.74%
images/badge-credly-member-grey.png19.09KB7.03KB▼ 63.17%