84% badgeos-invite-codes-add-on

Code Review | BadgeOS Invite Codes Add-on

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

About plugin

  • Plugin page: badgeos-invite-co...
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9.1
  • WordPress version: 6.3.1
  • First release: Sep 24, 2013
  • Latest release: Feb 28, 2022
  • Number of updates: 11
  • Update frequency: every 279.9 days
  • Top authors: credly (63.64%)sc0ttkclark (27.27%)learningtimes (18.18%)tw2113 (18.18%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,861 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

A check of server-side resources used by BadgeOS Invite Codes Add-on
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.78 ▼6.58
Dashboard /wp-admin3.31 ▲0.0046.71 ▼4.17
Posts /wp-admin/edit.php3.36 ▲0.0046.50 ▼2.73
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.27 ▼14.69
Media Library /wp-admin/upload.php3.23 ▲0.0034.54 ▲0.15

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for BadgeOS Invite Codes Add-on
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲8613.24 ▼0.942.24 ▲0.4543.83 ▲1.86
Dashboard /wp-admin2,203 ▲185.83 ▲0.92103.06 ▼2.4839.75 ▼1.48
Posts /wp-admin/edit.php2,089 ▼32.06 ▼0.0039.52 ▼1.4436.10 ▼0.58
Add New Post /wp-admin/post-new.php1,547 ▲1417.97 ▼5.32614.73 ▼30.2568.56 ▲10.54
Media Library /wp-admin/upload.php1,388 ▲34.30 ▲0.1097.66 ▼2.9742.69 ▼0.13

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

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
Even though no errors were found, this is by no means 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
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/badgeos-invite-codes-add-on/includes/settings.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/badgeos-invite-codes-add-on/buddypress-invite-codes.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/badgeos-invite-codes-add-on/includes/functions.php:46

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 errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 22 tag instead of maximum 10
Please take inspiration from this readme.txt

badgeos-invite-codes-add-on/buddypress-invite-codes.php 92% from 13 tests

The main PHP script in "BadgeOS Invite Codes Add-on" version 1.1.3 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("badgeos-invite-codes-add-on.php" instead of "buddypress-invite-codes.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
Everything looks great! No dangerous files found in this plugin982 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3271260784
PO File1313293
JavaScript118369
CSS19036

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions26
▷ Named functions26100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/learningtimes_icon.png0.62KB0.29KB▼ 53.22%