94% gamipress-h5p-integration

Code Review | GamiPress - H5P integration

WordPress plugin GamiPress - H5P integration scored 94% from 54 tests.

About plugin

  • Plugin page: gamipress-h5p-int...
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.9
  • WordPress version: 5.9.2
  • First release: May 15, 2018
  • Latest release: Jan 24, 2022
  • Number of updates: 19
  • Update frequency: every 71.1 days
  • Top authors: rubengc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active / 7,452 total downloads

Benchmarks

Plugin footprint Passed 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.02MB] [CPU: ▼295.43ms] Passed 4 tests

Server-side resources used by GamiPress - H5P integration
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0152.70 ▲2.97
Dashboard /wp-admin3.41 ▲0.0132.68 ▼0.71
Posts /wp-admin/edit.php3.65 ▲0.0136.89 ▼1.56
Add New Post /wp-admin/post-new.php6.89 ▼0.0892.17 ▼1,177.24
Media Library /wp-admin/upload.php3.30 ▲0.0122.55 ▼2.21

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for GamiPress - H5P integration
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,791 ▲4915.81 ▲0.175.62 ▲0.172.43 ▲0.09
Dashboard /wp-admin2,920 ▲626.05 ▼0.30118.27 ▼13.78156.95 ▼6.29
Posts /wp-admin/edit.php2,722 ▲313.24 ▲0.0164.04 ▼0.44138.45 ▼12.33
Add New Post /wp-admin/post-new.php1,687 ▲1918.81 ▲0.56400.92 ▲24.20151.70 ▼0.23
Media Library /wp-admin/upload.php1,726 ▲315.53 ▲0.02141.14 ▼13.51187.95 ▼200.85

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 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gamipress-h5p-integration/gamipress-h5p-integration.php:223

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
Please take inspiration from this readme.txt

gamipress-h5p-integration/gamipress-h5p-integration.php Passed 13 tests

The main PHP file in "GamiPress - H5P integration" ver. 1.0.6 adds more information about the plugin and also serves as the entry point for this plugin
27 characters long description:
Connect GamiPress with H5P.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin705 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP8227429603
JavaScript2184102

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.77
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods9
▷ Static methods111.11%
▷ Public methods555.56%
▷ Protected methods00.00%
▷ Private methods444.44%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG images were found in this plugin