83% badgeos-suggested-achievements-add-on

Code Review | BadgeOS Suggested Achievements Add-on

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

About plugin

  • Plugin page: badgeos-suggested...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9.1
  • WordPress version: 6.3.1
  • First release: Jun 7, 2016
  • Latest release: Feb 28, 2022
  • Number of updates: 10
  • Update frequency: every 209.6 days
  • Top authors: learningtimes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /7,179 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼8.20ms] Passed 4 tests

A check of server-side resources used by BadgeOS Suggested Achievements Add-on
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.67 ▼1.84
Dashboard /wp-admin3.31 ▼0.0448.37 ▼15.39
Posts /wp-admin/edit.php3.36 ▲0.0045.38 ▲0.59
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.98 ▼13.42
Media Library /wp-admin/upload.php3.23 ▲0.0034.78 ▼2.14

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for BadgeOS Suggested Achievements Add-on
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.31 ▼0.331.69 ▲0.0044.24 ▲4.84
Dashboard /wp-admin2,198 ▲245.59 ▼0.0297.92 ▲11.6163.27 ▲22.09
Posts /wp-admin/edit.php2,097 ▼32.03 ▲0.0135.56 ▼1.0039.71 ▲5.27
Add New Post /wp-admin/post-new.php1,526 ▼1323.44 ▲0.37645.18 ▼21.7948.67 ▼11.91
Media Library /wp-admin/upload.php1,400 ▼04.18 ▲0.0196.64 ▼16.4042.44 ▼2.76

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • 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
Everything seems fine, however 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
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/badgeos-suggested-achievements-add-on/includes/suggested-ranks-shortcode.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/badgeos-suggested-achievements-add-on/includes/credly_assertion_page.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/badgeos-suggested-achievements-add-on/includes/suggested-achievements-shortcode.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/badgeos-suggested-achievements-add-on/includes/functions.php:289
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/badgeos-suggested-achievements-add-on/badgeos-suggested-achievements.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: There are too many tags (22 tag instead of maximum 10)
You can look at the official readme.txt

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

This is the main PHP file of "BadgeOS Suggested Achievements Add-on" version 1.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, 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-suggested-achievements-add-on.php" instead of "badgeos-suggested-achievements.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin1,209 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP7287306978
JavaScript1158109
CSS112470
PO File1131352

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 problems
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity19.75
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity4.75
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods20
▷ Static methods15.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
css/icons.png1.10KB1.07KB▼ 2.93%