84% mycred-learndash-points-importer

Code Review | myCred LearnDash Points Importer

WordPress plugin myCred LearnDash Points Importer scored84%from 54 tests.

About plugin

  • Plugin page: mycred-learndash-...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3.2
  • WordPress version: 6.3.1
  • First release: Aug 24, 2021
  • Latest release: Nov 7, 2023
  • Number of updates: 12
  • Update frequency: every 67.3 days
  • Top authors: wpexpertsio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,139 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.93ms] Passed 4 tests

Analyzing server-side resources used by myCred LearnDash Points Importer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.05 ▼3.15
Dashboard /wp-admin3.34 ▲0.0442.80 ▼8.07
Posts /wp-admin/edit.php3.39 ▲0.0451.61 ▲0.65
Add New Post /wp-admin/post-new.php5.94 ▲0.0697.28 ▲4.18
Media Library /wp-admin/upload.php3.26 ▲0.0435.59 ▲2.85

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for myCred LearnDash Points Importer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3714.27 ▼0.461.79 ▲0.2045.29 ▲0.23
Dashboard /wp-admin2,204 ▲275.59 ▼0.0691.82 ▼0.7241.60 ▲0.36
Posts /wp-admin/edit.php2,109 ▲92.00 ▲0.0641.66 ▲1.5338.18 ▲0.91
Add New Post /wp-admin/post-new.php1,605 ▲7823.61 ▲0.61602.75 ▼33.0435.37 ▼21.54
Media Library /wp-admin/upload.php1,406 ▲34.28 ▲0.0997.66 ▲2.1442.65 ▼0.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/mycred-learndash-points-importer/mycred-learndash-points-importer.php:46

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: learndash, gamification, points, mycred, lms

mycred-learndash-points-importer/mycred-learndash-points-importer.php 92% from 13 tests

The primary PHP file in "myCred LearnDash Points Importer" version 1.1.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected262 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP15249187
JavaScript123854
CSS11021

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods770.00%
▷ Protected methods00.00%
▷ Private methods330.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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