84% mycred-for-courseware

Code Review | myCred for Courseware

WordPress plugin myCred for Courseware scored84%from 54 tests.

About plugin

  • Plugin page: mycred-for-course...
  • Plugin version: 1.1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.2.2
  • WordPress version: 6.3.1
  • First release: Jan 27, 2020
  • Latest release: Jun 19, 2023
  • Number of updates: 19
  • Update frequency: every 65.4 days
  • Top authors: wpexpertsio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,341 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼8.16ms] Passed 4 tests

A check of server-side resources used by myCred for Courseware
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0634.45 ▼6.47
Dashboard /wp-admin3.36 ▲0.0644.95 ▼9.43
Posts /wp-admin/edit.php3.47 ▲0.1250.72 ▲5.59
Add New Post /wp-admin/post-new.php5.94 ▲0.0583.09 ▼19.16
Media Library /wp-admin/upload.php3.28 ▲0.0535.97 ▲2.41

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

myCred for Courseware: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.63 ▼0.564.43 ▲2.4240.82 ▼6.89
Dashboard /wp-admin2,209 ▲185.85 ▼0.06103.31 ▼13.4938.71 ▼4.67
Posts /wp-admin/edit.php2,089 ▼02.15 ▲0.1636.88 ▲0.3434.72 ▲2.69
Add New Post /wp-admin/post-new.php1,514 ▼1917.61 ▼5.47652.68 ▼18.3175.91 ▲11.53
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.0795.70 ▼11.6041.46 ▼8.58

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • 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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/mycred-for-courseware/mycred-courseware.php:96

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: lms, course, mycred, wp courseware, module

mycred-for-courseware/mycred-courseware.php 85% from 13 tests

Analyzing the main PHP file in "myCred for Courseware" version 1.1.2
Please make the necessary changes and fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: The principal plugin file should be the same as the plugin slug ("mycred-for-courseware.php" instead of "mycred-courseware.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin245 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP266125187
PO File1161758

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity8.00
▷ Minimum class complexity6.00
▷ Maximum class complexity10.00
Average method complexity1.82
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods17
▷ Static methods15.88%
▷ Public methods1694.12%
▷ Protected methods00.00%
▷ Private methods15.88%
Functions2
▷ Named functions2100.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 images were found in this plugin