84% mycred-h5p

Code Review | myCred H5P

WordPress plugin myCred H5P scored84%from 54 tests.

About plugin

  • Plugin page: mycred-h5p
  • Plugin version: 1.2.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: WP 4.8-6.2
  • WordPress version: 6.3.1
  • First release: Mar 4, 2020
  • Latest release: Apr 13, 2023
  • Number of updates: 29
  • Update frequency: every 39.2 days
  • Top authors: wpexpertsio (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

400+ active /8,619 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.11ms] Passed 4 tests

Analyzing server-side resources used by myCred H5P
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.38 ▼4.67
Dashboard /wp-admin3.33 ▲0.0345.06 ▼3.38
Posts /wp-admin/edit.php3.38 ▲0.0348.35 ▲0.58
Add New Post /wp-admin/post-new.php5.91 ▲0.0385.08 ▼8.98
Media Library /wp-admin/upload.php3.25 ▲0.0337.25 ▲1.44

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

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

Browser metrics Passed 4 tests

Checking browser requirements for myCred H5P
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲10114.47 ▲0.171.93 ▼0.1641.00 ▼0.66
Dashboard /wp-admin2,217 ▲295.88 ▲0.96102.28 ▼12.8840.51 ▼2.01
Posts /wp-admin/edit.php2,099 ▲72.01 ▼0.0336.38 ▼0.7136.00 ▲1.31
Add New Post /wp-admin/post-new.php1,559 ▲3823.18 ▼0.06682.07 ▲3.3755.66 ▲3.88
Media Library /wp-admin/upload.php1,399 ▲114.26 ▲0.0198.92 ▼9.3543.64 ▼1.86

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/mycred-h5p/mycred-h5p.php:103

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: mycred, quiz, achievement, ranks, h5p

mycred-h5p/mycred-h5p.php 85% from 13 tests

The principal PHP file in "myCred H5P" v. 1.2.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Requires at least: Periods and digits should be used for the required version number (ex. "7.0" instead of "WP 4.8")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected479 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP5123120443
JavaScript11024
CSS13012

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity17.33
▷ Minimum class complexity9.00
▷ Maximum class complexity26.00
Average method complexity3.13
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods23
▷ Static methods14.35%
▷ Public methods2086.96%
▷ Protected methods00.00%
▷ Private methods313.04%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin