94% gamipress-ld-points-per-quiz-score

Code Review | GamiPress - LearnDash Points Per Quiz Score

WordPress plugin GamiPress - LearnDash Points Per Quiz Score scored 94% from 54 tests.

About plugin

  • Plugin page: gamipress-ld-poin...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.8
  • WordPress version: 5.8.1
  • First release: Sep 20, 2021
  • Latest release: Oct 29, 2021
  • Number of updates: 3
  • Update frequency: every 13.7 days
  • Top authors: rubengc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 315 total downloads

Benchmarks

Plugin footprint Passed 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.02MB] [CPU: ▼141.02ms] Passed 4 tests

Analyzing server-side resources used by GamiPress - LearnDash Points Per Quiz Score
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1432.75 ▼0.81
Dashboard /wp-admin3.08 ▲0.0345.23 ▼5.63
Posts /wp-admin/edit.php3.13 ▲0.0344.96 ▲0.31
Add New Post /wp-admin/post-new.php5.44 ▲0.0194.56 ▼557.93
Media Library /wp-admin/upload.php3.02 ▲0.0234.51 ▲1.89

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for GamiPress - LearnDash Points Per Quiz Score
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,731 ▲12516.01 ▲0.419.68 ▼1.6546.32 ▼1.26
Dashboard /wp-admin2,991 ▲545.95 ▼0.05145.99 ▼21.27109.56 ▼1.59
Posts /wp-admin/edit.php2,770 ▲312.73 ▲0.0167.52 ▲1.9587.97 ▼4.61
Add New Post /wp-admin/post-new.php1,513 ▼17018.84 ▲0.35396.75 ▼12.21108.56 ▲1.03
Media Library /wp-admin/upload.php1,777 ▼335.02 ▲0.02165.95 ▲11.46114.28 ▼4.48

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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 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× 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-ld-points-per-quiz-score/gamipress-ld-points-per-quiz-score.php:224

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can look at the official readme.txt

gamipress-ld-points-per-quiz-score/gamipress-ld-points-per-quiz-score.php Passed 13 tests

The primary PHP file in "GamiPress - LearnDash Points Per Quiz Score" version 1.0.1 is used by WordPress to initiate all plugin functionality
55 characters long description:
Award points based on the user quiz score in LearnDash.

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
No dangerous file extensions were detected211 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP479183199
JavaScript24112

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity7.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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
PNG images were not found in this plugin