84% gamipress-learndash-points-importer

Code Review | GamiPress - LearnDash Points Importer

WordPress plugin GamiPress - LearnDash Points Importer scored84%from 54 tests.

About plugin

  • Plugin page: gamipress-learnda...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Jun 25, 2020
  • Latest release: Sep 4, 2023
  • Number of updates: 12
  • Update frequency: every 97.3 days
  • Top authors: rubengc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,677 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

This is a short check of server-side resources used by GamiPress - LearnDash Points Importer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0242.55 ▲6.94
Dashboard /wp-admin3.33 ▼0.0245.11 ▼17.05
Posts /wp-admin/edit.php3.38 ▲0.0244.59 ▼7.34
Add New Post /wp-admin/post-new.php5.91 ▲0.0279.84 ▼10.71
Media Library /wp-admin/upload.php3.25 ▲0.0236.27 ▲2.38

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by GamiPress - LearnDash Points Importer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲4814.11 ▼0.241.71 ▲0.1841.12 ▲2.85
Dashboard /wp-admin2,212 ▲345.53 ▼0.2188.89 ▼22.1539.58 ▼3.48
Posts /wp-admin/edit.php2,124 ▲242.01 ▲0.0139.83 ▲3.5337.79 ▲3.62
Add New Post /wp-admin/post-new.php1,550 ▲2218.41 ▼4.66624.35 ▼42.8158.04 ▲6.27
Media Library /wp-admin/upload.php1,417 ▲204.17 ▼0.04101.99 ▲2.6743.14 ▼2.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gamipress-learndash-points-importer/gamipress-learndash-points-importer.php:204

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% 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
Attributes that need to be fixed:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
You can take inspiration from this readme.txt

gamipress-learndash-points-importer/gamipress-learndash-points-importer.php Passed 13 tests

The main PHP script in "GamiPress - LearnDash Points Importer" version 1.0.1 is automatically included on every request by WordPress
58 characters long description:
Tool to migrate LearnDash user points to GamiPress points.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected235 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP378147178
JavaScript222857

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods9
▷ Static methods111.11%
▷ Public methods555.56%
▷ Protected methods00.00%
▷ Private methods444.44%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants4
▷ 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
No PNG files were detected