83% mycred-lifterlms-integration

Code Review | myCred - LifterLMS Integration

WordPress plugin myCred - LifterLMS Integration scored83%from 54 tests.

About plugin

  • Plugin page: mycred-lifterlms-...
  • Plugin version: 1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: WP 4.8-6.3.2
  • WordPress version: 6.3.1
  • First release: Nov 13, 2019
  • Latest release: Nov 7, 2023
  • Number of updates: 38
  • Update frequency: every 38.3 days
  • Top authors: wpexpertsio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /4,371 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
Install script ran successfully

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

An overview of server-side resources used by myCred - LifterLMS Integration
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.90 ▼4.37
Dashboard /wp-admin3.30 ▼0.0445.96 ▼18.51
Posts /wp-admin/edit.php3.36 ▲0.0048.45 ▼2.00
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.50 ▼15.24
Media Library /wp-admin/upload.php3.23 ▲0.0036.32 ▼0.32

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for myCred - LifterLMS Integration
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.62 ▲0.381.52 ▼0.1837.31 ▼4.01
Dashboard /wp-admin2,198 ▲175.60 ▼0.0693.73 ▼19.2742.07 ▼1.34
Posts /wp-admin/edit.php2,097 ▼32.03 ▲0.0840.44 ▼1.6735.21 ▼3.50
Add New Post /wp-admin/post-new.php1,526 ▼023.59 ▲0.73628.22 ▲7.8247.21 ▼18.68
Media Library /wp-admin/upload.php1,394 ▼64.20 ▼0.0697.91 ▲0.5140.83 ▼0.47

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

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

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)
Good news, no errors were detected

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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mycred-lifterlms-integration/mycred-lifterlms.php:295

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add descriptions for screenshots #1, #10, #11, #12, #13, #14, #15, #16, #17, #18, #19, #2, #20, #21, #22, #23, #24, #3, #4, #5, #6, #7, #8, #9 in mycred-lifterlms-integration/assets to your readme.txt
Please take inspiration from this readme.txt

mycred-lifterlms-integration/mycred-lifterlms.php 85% from 13 tests

The primary PHP file in "myCred - LifterLMS Integration" version 1.3 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Requires at least: Required version number should only contain digits separated by dots (ex. "7.0" instead of "WP 4.8")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("mycred-lifterlms-integration.php" instead of "mycred-lifterlms.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
No dangerous file extensions were detected2,055 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP154605051,941
CSS25082
JavaScript212132

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity12.00
▷ Minimum class complexity3.00
▷ Maximum class complexity38.00
Average method complexity2.51
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes17.14%
Methods102
▷ Static methods21.96%
▷ Public methods8684.31%
▷ Protected methods1312.75%
▷ Private methods32.94%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected