10% gtg-audio-player

Code Review | GTG Audio Player

WordPress plugin GTG Audio Player scored10%from 54 tests.

About plugin

  • Plugin page: gtg-audio-player
  • Plugin version: 4.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.5.3
  • WordPress version: 6.3.1
  • First release: May 3, 2016
  • Latest release: Aug 7, 2016
  • Number of updates: 36
  • Update frequency: every 2.7 days
  • Top authors: czerstwyjurek (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,553 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method gtg_audio_player::gtg_ap_install() should not be called statically

Server metrics [RAM: ▼1.92MB] [CPU: ▼54.36ms] Passed 4 tests

This is a short check of server-side resources used by GTG Audio Player
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.62 ▼34.91
Dashboard /wp-admin2.08 ▼1.225.84 ▼41.19
Posts /wp-admin/edit.php2.08 ▼1.276.24 ▼43.83
Add New Post /wp-admin/post-new.php2.08 ▼3.806.99 ▼97.49
Media Library /wp-admin/upload.php2.08 ▼1.155.90 ▼26.53
GTG Audio Player /wp-admin/upload.php?page=gtg_audio_player2.085.05

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 17 new files
Database: 3 new tables, 7 new options
New tables
wp_gtg_ap_options
wp_gtg_ap_songs
wp_gtg_ap
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
gtg_ap_db_version
db_upgraded

Browser metrics Passed 4 tests

GTG Audio Player: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.29 ▼1.294.49 ▲2.7343.05 ▲1.04
Dashboard /wp-admin2,210 ▲224.88 ▼0.25111.68 ▲1.1042.64 ▼0.60
Posts /wp-admin/edit.php2,093 ▲42.02 ▼0.0234.07 ▼7.6434.84 ▼3.24
Add New Post /wp-admin/post-new.php1,536 ▲1323.08 ▼0.55661.94 ▲24.6053.22 ▼1.29
Media Library /wp-admin/upload.php1,386 ▼54.19 ▼0.0598.94 ▼3.4344.56 ▼2.59
GTG Audio Player /wp-admin/upload.php?page=gtg_audio_player9542.1330.4331.39

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method gtg_audio_player::gtg_ap_update_db_check() should not be called statically
  • Zombie tables were found after uninstall: 3 tables
    • wp_gtg_ap_songs
    • wp_gtg_ap_options
    • wp_gtg_ap
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • gtg_ap_db_version
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/upload.php?page=gtg_audio_player
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method gtg_audio_player::gtg_ap_update_db_check() should not be called statically
    • > GET request to /wp-admin/upload.php?page=gtg_audio_player
    • > Deprecated in wp-content/plugins/gtg-audio-player/gtg_audio_player.php+1336
    Non-static method gtg_audio_player::gtg_ap_install() should not be called statically
    • > GET request to /wp-admin/upload.php?page=gtg_audio_player
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method gtg_audio_player::gtg_ap_add_translations() should not be called statically
    • > GET request to /wp-admin/upload.php?page=gtg_audio_player
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method gtg_audio_player::gtg_ap_menu() should not be called statically
    • > GET request to /wp-admin/upload.php?page=gtg_audio_player
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method gtg_audio_player::gtg_ap_options() should not be called statically
    • > GET request to /wp-admin/upload.php?page=gtg_audio_player
    • > Deprecated in wp-content/plugins/gtg-audio-player/gtg_audio_player.php+563
    Non-static method gtg_audio_player::gtg_ap_admin_css() should not be called statically
    • > GET request to /wp-admin/upload.php?page=gtg_audio_player
    • > Deprecated in wp-content/plugins/gtg-audio-player/gtg_audio_player.php+564
    Non-static method gtg_audio_player::start_admin_wrapper() should not be called statically
    • > GET request to /wp-admin/upload.php?page=gtg_audio_player
    • > Deprecated in wp-content/plugins/gtg-audio-player/gtg_audio_player.php+859
    Non-static method gtg_audio_player::render_album_form() should not be called statically
    • > GET request to /wp-admin/upload.php?page=gtg_audio_player
    • > Deprecated in wp-content/plugins/gtg-audio-player/gtg_audio_player.php+860
    Non-static method gtg_audio_player::show_albums() should not be called statically
    • > GET request to /wp-admin/upload.php?page=gtg_audio_player
    • > Deprecated in wp-content/plugins/gtg-audio-player/gtg_audio_player.php+861
    Non-static method gtg_audio_player::render_form_js() should not be called statically
    • > GET request to /wp-admin/upload.php?page=gtg_audio_player
    • > Deprecated in wp-content/plugins/gtg-audio-player/gtg_audio_player.php+863
    Non-static method gtg_audio_player::end_admin_wrapper() should not be called statically

SRP 50% 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
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/gtg-audio-player/uninstall.php
    • > /wp-content/plugins/gtg-audio-player/gtg_audio_player.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Contributors: Contributors not specified
The official readme.txt is a good inspiration

gtg-audio-player/gtg_audio_player.php 85% from 13 tests

The principal PHP file in "GTG Audio Player" v. 4.8 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("gtg-audio-player.php" instead of "gtg_audio_player.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected1,288 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2113451,205
PO File1323878
JavaScript1005

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity63.00
▷ Minimum class complexity63.00
▷ Maximum class complexity63.00
Average method complexity4.88
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods743.75%
▷ Protected methods00.00%
▷ Private methods956.25%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/playlist.png2.85KB0.26KB▼ 90.81%
img/next.png3.05KB0.55KB▼ 82.09%
img/pause.png2.81KB0.16KB▼ 94.30%
img/stop.png2.78KB0.12KB▼ 95.58%
img/prev.png3.05KB0.52KB▼ 82.91%