83% grassblade-xapi-wp-courseware

Code Review | Experience API for WP Courseware by Grassblade

WordPress plugin Experience API for WP Courseware by Grassblade scored 83% from 54 tests.

About plugin

  • Plugin page: grassblade-xapi-w...
  • Plugin version: 2.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Sep 20, 2019
  • Latest release: Jun 5, 2023
  • Number of updates: 29
  • Update frequency: every 46.7 days
  • Top authors: liveaspankaj (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 2,545 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.38MB] [CPU: ▼1.19ms] 75% from 4 tests

This is a short check of server-side resources used by Experience API for WP Courseware by Grassblade
Please have a look at the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 3,705.03ms on /wp-admin/admin.php?page=grassblade-addons)
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3744.53 ▲6.00
Dashboard /wp-admin3.68 ▲0.3848.99 ▼4.08
Posts /wp-admin/edit.php3.79 ▲0.4449.93 ▲4.63
Add New Post /wp-admin/post-new.php6.26 ▲0.3884.95 ▼9.11
Media Library /wp-admin/upload.php3.60 ▲0.3838.04 ▲3.82
GrassBlade /wp-admin/admin.php?page=grassblade-lrs-settings3.5735.09
Add-ons /wp-admin/admin.php?page=grassblade-addons3.793,705.03
WP Courseware LMS /wp-admin/admin.php?page=grassblade-wp-courseware3.6033.72

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Experience API for WP Courseware by Grassblade
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲10513.20 ▼1.201.79 ▼0.0844.07 ▲0.05
Dashboard /wp-admin2,243 ▲525.84 ▼0.0195.21 ▼12.2278.92 ▲33.62
Posts /wp-admin/edit.php2,132 ▲431.98 ▼0.0634.27 ▼1.4532.89 ▼0.48
Add New Post /wp-admin/post-new.php1,558 ▲2523.16 ▲0.18687.98 ▲102.7365.66 ▲16.85
Media Library /wp-admin/upload.php1,419 ▲374.23 ▼0.01125.19 ▲26.8686.35 ▲41.76
GrassBlade /wp-admin/admin.php?page=grassblade-lrs-settings9152.0124.5437.29
Add-ons /wp-admin/admin.php?page=grassblade-addons2,8232.1828.3572.38
WP Courseware LMS /wp-admin/admin.php?page=grassblade-wp-courseware9052.0223.9531.62

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • grassblade_addons
    • widget_recent-comments
    • theysaidso_admin_options
    • grassblade_free_addons
    • db_upgraded

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/grassblade-xapi-wp-courseware/functions.php on line 25
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/grassblade-xapi-wp-courseware/functions.php on line 25
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/grassblade-xapi-wp-courseware/functions.php on line 25

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
  • Donate link: Please fix this invalid URI: ""
The official readme.txt is a good inspiration

grassblade-xapi-wp-courseware/functions.php 92% from 13 tests

Analyzing the main PHP file in "Experience API for WP Courseware by Grassblade" version 2.3
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("grassblade-xapi-wp-courseware.php" instead of "functions.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 plugin1,688 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24192341,605
JavaScript131083

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity159.50
▷ Minimum class complexity116.00
▷ Maximum class complexity203.00
Average method complexity5.88
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods65
▷ Static methods23.08%
▷ Public methods65100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
6 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/icon_30x30.png4.58KB1.60KB▼ 65.15%
img/no.png1.01KB0.62KB▼ 39.05%
img/icon-gb.png3.43KB0.84KB▼ 75.48%
img/icon_128x128.png22.67KB6.87KB▼ 69.71%
img/gb_logo.png3.43KB0.84KB▼ 75.48%