94% gamipress-youtube-integration

Code Review | GamiPress - Youtube integration

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

About plugin

  • Plugin page: gamipress-youtube...
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.9
  • WordPress version: 5.9.2
  • First release: Feb 9, 2019
  • Latest release: Jan 24, 2022
  • Number of updates: 21
  • Update frequency: every 51.4 days
  • Top authors: rubengc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

700+ active / 9,392 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼303.22ms] Passed 4 tests

Server-side resources used by GamiPress - Youtube integration
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0654.88 ▲5.37
Dashboard /wp-admin3.43 ▲0.0333.23 ▼20.03
Posts /wp-admin/edit.php3.66 ▲0.0338.35 ▼0.41
Add New Post /wp-admin/post-new.php6.90 ▼0.0795.28 ▼1,197.80
Media Library /wp-admin/upload.php3.32 ▲0.0231.79 ▲6.34

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for GamiPress - Youtube integration
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,772 ▲1915.89 ▲0.315.70 ▼0.232.29 ▼0.16
Dashboard /wp-admin2,904 ▲436.14 ▼0.04116.06 ▼12.12158.12 ▼3.11
Posts /wp-admin/edit.php2,717 ▲473.24 ▼0.0187.09 ▼5.27149.69 ▲1.62
Add New Post /wp-admin/post-new.php1,737 ▲7621.97 ▲0.34477.33 ▲39.75177.90 ▲12.88
Media Library /wp-admin/upload.php1,721 ▲235.55 ▲0.14149.72 ▲3.96193.37 ▲7.48

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
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 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gamipress-youtube-integration/gamipress-youtube.php:219

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

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
Please fix the following attributes:
  • Tags: There are too many tags (14 tag instead of maximum 10)
Please take inspiration from this readme.txt

gamipress-youtube-integration/gamipress-youtube.php 92% from 13 tests

"GamiPress - Youtube integration" version 1.0.7'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 ("gamipress-youtube-integration.php" instead of "gamipress-youtube.php")

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
Everything looks great! No dangerous files found in this plugin787 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12158373364
SVG100308
JavaScript44727115

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity6.00
▷ Minimum class complexity3.00
▷ Maximum class complexity9.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods12
▷ Static methods18.33%
▷ Public methods866.67%
▷ Protected methods00.00%
▷ Private methods433.33%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
No PNG files were detected