83% badgeos-community-add-on

Code Review | BadgeOS Community Add-on

WordPress plugin BadgeOS Community Add-on scored83%from 54 tests.

About plugin

  • Plugin page: badgeos-community...
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 2, 2013
  • Latest release: Feb 28, 2022
  • Number of updates: 47
  • Update frequency: every 68.6 days
  • Top authors: learningtimes (44.68%)credly (27.66%)Messenlehner (23.4%)tw2113 (10.64%)

Code review

54 tests

User reviews

23 reviews

Install metrics

1,000+ active /111,276 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.34ms] Passed 4 tests

A check of server-side resources used by BadgeOS Community Add-on
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.09 ▼0.12
Dashboard /wp-admin3.31 ▲0.0045.81 ▼3.45
Posts /wp-admin/edit.php3.36 ▲0.0049.65 ▲0.10
Add New Post /wp-admin/post-new.php5.89 ▲0.00122.10 ▲28.15
Media Library /wp-admin/upload.php3.23 ▲0.0033.68 ▼1.87

Server storage [IO: ▲0.15MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

BadgeOS Community Add-on: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲7213.30 ▼1.081.77 ▼0.0044.06 ▼1.04
Dashboard /wp-admin2,206 ▲265.85 ▲0.78111.05 ▼0.4941.02 ▲0.59
Posts /wp-admin/edit.php2,092 ▼02.05 ▲0.0439.15 ▼3.3133.58 ▼1.57
Add New Post /wp-admin/post-new.php1,517 ▼2517.77 ▼0.29600.55 ▼20.5256.75 ▼0.54
Media Library /wp-admin/upload.php1,388 ▲64.21 ▲0.0495.11 ▼5.4141.12 ▼0.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
Please take a closer look at the following
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/badgeos-community-add-on/includes/bp-members.php:88
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/badgeos-community-add-on/includes/rules-engine.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/badgeos-community-add-on/includes/bp-activity.php:71
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/badgeos-community-add-on/badgeos-community.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/badgeos-community-add-on/includes/settings.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/badgeos-community-add-on/includes/bp-member-ranks.php:177
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/badgeos-community-add-on/includes/submission-filters.php:52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/badgeos-community-add-on/includes/steps-ui.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/badgeos-community-add-on/includes/bp-member-points.php:75

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: Too many tags (20 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Requires at least: Invalid version format
Please take inspiration from this readme.txt

badgeos-community-add-on/badgeos-community.php 85% from 13 tests

Analyzing the main PHP file in "BadgeOS Community Add-on" version 1.3.1
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("badgeos-community-add-on.php" instead of "badgeos-community.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin1,665 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP94407391,518
PO File13940111
CSS10036

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity14.75
▷ Minimum class complexity5.00
▷ Maximum class complexity19.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods20
▷ Static methods210.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions56
▷ Named functions56100.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
There are no PNG files in this plugin