84% wplms-mycred-addon

Code Review | WPLMS MyCred AddOn

WordPress plugin WPLMS MyCred AddOn scored84%from 54 tests.

About plugin

  • Plugin page: wplms-mycred-addon
  • Plugin version: 4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.8
  • WordPress version: 6.3.1
  • First release: Jul 23, 2015
  • Latest release: Aug 28, 2021
  • Number of updates: 21
  • Update frequency: every 106.1 days
  • Top authors: wpthemes (76.19%)VibeThemes (28.57%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /74,338 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by WPLMS MyCred AddOn
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0147.45 ▲5.81
Dashboard /wp-admin3.31 ▲0.0149.47 ▼1.26
Posts /wp-admin/edit.php3.36 ▲0.0152.73 ▲2.18
Add New Post /wp-admin/post-new.php5.89 ▲0.0194.36 ▼12.98
Media Library /wp-admin/upload.php3.23 ▲0.0135.29 ▼1.69

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WPLMS MyCred AddOn
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.76 ▲0.401.55 ▼0.5237.99 ▼9.47
Dashboard /wp-admin2,199 ▲195.64 ▼0.0292.02 ▲1.7441.82 ▼0.71
Posts /wp-admin/edit.php2,104 ▲72.01 ▼0.0040.12 ▲4.7536.03 ▼1.46
Add New Post /wp-admin/post-new.php1,530 ▲423.65 ▲0.40622.02 ▼55.9660.92 ▲4.71
Media Library /wp-admin/upload.php1,401 ▲44.21 ▲0.00101.80 ▼1.1747.46 ▲1.82

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Please fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wplms-mycred-addon/includes/dashboard_widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wplms-mycred-addon/includes/referral.php:47

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)
There were no browser issues found


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: learning management, mycred, points system, courses, lms

wplms-mycred-addon/wplms-mycred-addon.php 92% from 13 tests

The main PHP script in "WPLMS MyCred AddOn" version 4.2 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected2,388 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PO File1145261373

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity37.86
▷ Minimum class complexity4.00
▷ Maximum class complexity75.00
Average method complexity4.15
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
▷ Static methods44.88%
▷ Public methods7895.12%
▷ Protected methods11.22%
▷ Private methods33.66%
▷ Named functions1090.91%
▷ Anonymous functions19.09%
▷ Global constants4100.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