88% h5pxapikatchu

Code Review | SNORDIAN's H5PxAPIkatchu

WordPress plugin SNORDIAN's H5PxAPIkatchu scored 88% from 54 tests.

About plugin

  • Plugin page: h5pxapikatchu
  • Plugin version: 0.4.12
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9
  • WordPress version: 5.9.2
  • First release: Dec 27, 2017
  • Latest release: Apr 4, 2022
  • Number of updates: 85
  • Update frequency: every 18.4 days
  • Top authors: otacke (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

600+ active / 10,042 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.38MB] [CPU: ▼312.75ms] Passed 4 tests

An overview of server-side resources used by SNORDIAN's H5PxAPIkatchu
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.4271.89 ▲1.81
Dashboard /wp-admin3.79 ▲0.3841.70 ▲1.06
Posts /wp-admin/edit.php4.01 ▲0.3742.09 ▼2.83
Add New Post /wp-admin/post-new.php7.32 ▲0.35109.15 ▼1,251.02
Media Library /wp-admin/upload.php3.73 ▲0.4336.10 ▲1.85
H5PxAPIkatchu /wp-admin/options-general.php?page=h5pxapikatchu-admin3.6530.19

Server storage [IO: ▲2.84MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 93 new files
Database: 5 new tables, 3 new options
New tables
wp_h5pxapikatchu
wp_h5pxapikatchu_actor
wp_h5pxapikatchu_verb
wp_h5pxapikatchu_result
wp_h5pxapikatchu_object
New WordPress options
h5pxapikatchu_version
h5pxapikatchu_option
h5pxapikatchu_defaults_set

Browser metrics Passed 4 tests

SNORDIAN's H5PxAPIkatchu: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,868 ▲12416.04 ▲0.3011.34 ▲2.433.54 ▲0.34
Dashboard /wp-admin2,958 ▲386.41 ▲0.01183.48 ▼17.93199.85 ▼30.65
Posts /wp-admin/edit.php2,725 ▲193.43 ▲0.0191.61 ▲10.91199.39 ▲27.04
Add New Post /wp-admin/post-new.php1,649 ▼1320.92 ▲4.01679.96 ▲44.10222.99 ▲9.12
Media Library /wp-admin/upload.php1,734 ▲25.70 ▼0.03181.60 ▼8.49258.83 ▼14.14
H5PxAPIkatchu /wp-admin/options-general.php?page=h5pxapikatchu-admin1,3363.60110.03200.67

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/h5pxapikatchu/h5pxapikachu.php
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/h5pxapikatchu/class-database.php on line 836
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/h5pxapikatchu/class-database.php on line 837
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/h5pxapikatchu/class-database.php on line 840
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/h5pxapikatchu/class-database.php on line 841
    • > PHP Fatal error
      Uncaught Error: Call to undefined function H5PXAPIKATCHU\\get_option() in wp-content/plugins/h5pxapikatchu/class-options.php:609
    • > PHP Fatal error
      Uncaught Error: Call to undefined function H5PXAPIKATCHU\\add_action() in wp-content/plugins/h5pxapikatchu/class-database.php:846
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/h5pxapikatchu/class-database.php on line 839
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/h5pxapikatchu/class-database.php on line 838
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/h5pxapikatchu/class-database.php on line 835

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: h5p, xapi

h5pxapikatchu/h5pxapikachu.php 85% from 13 tests

This is the main PHP file of "SNORDIAN's H5PxAPIkatchu" version 0.4.12, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("h5pxapikatchu.php" instead of "h5pxapikachu.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
Everything looks great! No dangerous files found in this plugin27,640 lines of code in 81 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript413,7938,41014,568
CSS281,16714910,704
PHP63325311,725
PO File17580212
XML193249156
Sass2293142
Markdown127075
JSON12058

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity35.00
▷ Minimum class complexity7.00
▷ Maximum class complexity90.00
Average method complexity3.21
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods73
▷ Static methods3243.84%
▷ Public methods5980.82%
▷ Protected methods00.00%
▷ Private methods1419.18%
Functions21
▷ Named functions1885.71%
▷ Anonymous functions314.29%
Constants1
▷ Global constants1100.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
5 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
DataTables/DataTables-1.10.18/images/sort_asc.png0.16KB0.25KB0.00%
DataTables/DataTables-1.10.18/images/sort_asc_disabled.png0.14KB0.25KB0.00%
DataTables/DataTables-1.10.18/images/sort_both.png0.20KB0.29KB0.00%
DataTables/DataTables-1.10.18/images/sort_desc.png0.15KB0.25KB0.00%
DataTables/DataTables-1.10.18/images/sort_desc_disabled.png0.14KB0.25KB0.00%