78% h5pxapikatchu

Code Review | SNORDIAN's H5PxAPIkatchu

WordPress plugin SNORDIAN's H5PxAPIkatchu scored78%from 54 tests.

About plugin

  • Plugin page: h5pxapikatchu
  • Plugin version: 0.4.13
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Dec 27, 2017
  • Latest release: Jul 23, 2023
  • Number of updates: 89
  • Update frequency: every 22.9 days
  • Top authors: otacke (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

600+ active /13,281 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.37MB] [CPU: ▼3.13ms] Passed 4 tests

A check of server-side resources used by SNORDIAN's H5PxAPIkatchu
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3636.67 ▼0.00
Dashboard /wp-admin3.74 ▲0.3947.25 ▼14.84
Posts /wp-admin/edit.php3.79 ▲0.4348.36 ▼1.16
Add New Post /wp-admin/post-new.php6.25 ▲0.3793.02 ▲3.49
Media Library /wp-admin/upload.php3.60 ▲0.3738.88 ▲4.40
H5PxAPIkatchu /wp-admin/options-general.php?page=h5pxapikatchu-admin3.5733.88

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 95 new files
Database: 5 new tables, 9 new options
New tables
wp_h5pxapikatchu_actor
wp_h5pxapikatchu_object
wp_h5pxapikatchu_result
wp_h5pxapikatchu
wp_h5pxapikatchu_verb
New WordPress options
h5pxapikatchu_defaults_set
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
h5pxapikatchu_option
widget_recent-posts
h5pxapikatchu_version
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for SNORDIAN's H5PxAPIkatchu
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲3514.74 ▲0.361.69 ▼0.3738.93 ▼5.63
Dashboard /wp-admin2,212 ▲274.86 ▼0.96114.67 ▼3.6938.88 ▼9.93
Posts /wp-admin/edit.php2,098 ▲92.06 ▲0.0639.38 ▲2.5636.44 ▼0.16
Add New Post /wp-admin/post-new.php1,524 ▼423.50 ▲5.17643.64 ▲2.3349.66 ▼0.34
Media Library /wp-admin/upload.php1,394 ▲124.24 ▲0.0297.37 ▲1.5843.40 ▼0.27
H5PxAPIkatchu /wp-admin/options-general.php?page=h5pxapikatchu-admin1,0412.7645.1140.08

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

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

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
2 plugin tags: h5p, xapi

h5pxapikatchu/h5pxapikachu.php 85% from 13 tests

"SNORDIAN's H5PxAPIkatchu" version 0.4.13's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("h5pxapikatchu.php" instead of "h5pxapikachu.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

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
No dangerous file extensions were detected27,851 lines of code in 82 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript413,7938,41014,568
CSS281,16714910,704
PHP63325311,725
PO File2150160423
XML193249156
Sass2293142
Markdown127075
JSON12058

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
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_desc_disabled.png0.14KB0.25KB0.00%
DataTables/DataTables-1.10.18/images/sort_desc.png0.15KB0.25KB0.00%
DataTables/DataTables-1.10.18/images/sort_both.png0.20KB0.29KB0.00%