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

Code Review | GamiPress - LearnDash Points Per Quiz Score

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

About plugin

  • Plugin page: gamipress-ld-poin...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Sep 20, 2021
  • Latest release: Sep 4, 2023
  • Number of updates: 10
  • Update frequency: every 71.6 days
  • Top authors: rubengc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /3,097 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.02MB] [CPU: ▼11.72ms] 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 /3.49 ▲0.0232.49 ▼10.00
Dashboard /wp-admin3.33 ▲0.0341.62 ▼5.47
Posts /wp-admin/edit.php3.38 ▲0.0242.73 ▼2.56
Add New Post /wp-admin/post-new.php5.91 ▲0.0279.76 ▼28.86
Media Library /wp-admin/upload.php3.25 ▲0.0234.74 ▲1.87

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, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded

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 /2,809 ▲4814.36 ▲0.011.67 ▼0.2637.54 ▼5.22
Dashboard /wp-admin2,218 ▲415.60 ▲0.0780.94 ▼8.6839.77 ▼2.23
Posts /wp-admin/edit.php2,121 ▲181.99 ▼0.0334.79 ▼5.5535.91 ▼0.57
Add New Post /wp-admin/post-new.php1,543 ▲623.35 ▲5.07673.23 ▲33.7252.92 ▼12.12
Media Library /wp-admin/upload.php1,420 ▲204.14 ▼0.0597.30 ▲0.5545.69 ▲3.43

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

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.3 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 detected212 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP479183200
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.44
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