84% grassblade-xapi-masterstudy

Code Review | Experience API for MasterStudy by GrassBlade

WordPress plugin Experience API for MasterStudy by GrassBlade scored84%from 54 tests.

About plugin

  • Plugin page: grassblade-xapi-m...
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Feb 17, 2022
  • Latest release: Jun 13, 2023
  • Number of updates: 6
  • Update frequency: every 80.5 days
  • Top authors: liveaspankaj (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /655 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.18MB] [CPU: ▲0.78ms] Passed 4 tests

Server-side resources used by Experience API for MasterStudy by GrassBlade
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1845.90 ▲5.86
Dashboard /wp-admin3.49 ▲0.1853.15 ▲3.29
Posts /wp-admin/edit.php3.60 ▲0.2452.37 ▲0.41
Add New Post /wp-admin/post-new.php6.07 ▲0.1896.52 ▲0.62
Media Library /wp-admin/upload.php3.41 ▲0.1835.34 ▼1.21
MasterStudy LMS /wp-admin/admin.php?page=grassblade-masterstudy-lms3.3732.62
GrassBlade /wp-admin/admin.php?page=grassblade-lrs-settings3.3736.52

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Experience API for MasterStudy by GrassBlade
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6414.25 ▼0.121.86 ▲0.1742.38 ▼2.54
Dashboard /wp-admin2,216 ▲395.74 ▲0.0990.47 ▲2.1492.74 ▲49.93
Posts /wp-admin/edit.php2,143 ▲401.97 ▼0.0240.60 ▲0.9034.35 ▼3.48
Add New Post /wp-admin/post-new.php1,561 ▲3523.81 ▲0.38626.36 ▼21.5861.88 ▲9.52
Media Library /wp-admin/upload.php1,436 ▲364.17 ▲0.01100.25 ▼0.7078.64 ▲33.45
MasterStudy LMS /wp-admin/admin.php?page=grassblade-masterstudy-lms9081.9922.8632.23
GrassBlade /wp-admin/admin.php?page=grassblade-lrs-settings9212.0023.9430.39

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/grassblade-xapi-masterstudy/functions.php on line 20
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/grassblade-xapi-masterstudy/functions.php on line 1155
    • > 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-masterstudy/functions.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/grassblade-xapi-masterstudy/functions.php:25
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/grassblade-xapi-masterstudy/functions.php on line 20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid URI: ""
The official readme.txt might help

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

"Experience API for MasterStudy by GrassBlade" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("grassblade-xapi-masterstudy.php" instead of "functions.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected914 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP224857914

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity93.50
▷ Minimum class complexity11.00
▷ Maximum class complexity176.00
Average method complexity5.74
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods39
▷ Static methods923.08%
▷ Public methods39100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
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/gb_logo.png3.43KB0.84KB▼ 75.48%
img/no.png1.01KB0.62KB▼ 39.05%
img/icon-gb.png3.43KB0.84KB▼ 75.48%
img/check.png0.98KB0.47KB▼ 52.44%