10% wp-audio-gallery

Code Review | WP AUDIO GALLERY

WordPress plugin WP AUDIO GALLERY scored10%from 54 tests.

About plugin

  • Plugin page: wp-audio-gallery
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.1
  • WordPress version: 6.3.1
  • First release: May 23, 2017
  • Latest release: Dec 15, 2017
  • Number of updates: 16
  • Update frequency: every 12.9 days
  • Top authors: husainali52 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,807 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/wp-audio-gallery/wp-audio-gallery.php+25
    Methods with the same name as their class will not be constructors in a future version of PHP; wpag_wp_Loader has a deprecated constructor

Server metrics [RAM: ▼1.81MB] [CPU: ▼55.99ms] Passed 4 tests

Analyzing server-side resources used by WP AUDIO GALLERY
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.18 ▼1.284.99 ▼36.91
Dashboard /wp-admin2.20 ▼1.106.51 ▼43.72
Posts /wp-admin/edit.php2.20 ▼1.167.28 ▼46.16
Add New Post /wp-admin/post-new.php2.20 ▼3.696.01 ▼97.18
Media Library /wp-admin/upload.php2.20 ▼1.036.43 ▼30.11
WP Audio Gallery /wp-admin/edit.php?post_type=wpag_audio_gallery2.208.65
Add New /wp-admin/post-new.php?post_type=wpag_audio_gallery2.206.43
Categories /wp-admin/edit-tags.php?taxonomy=wp_ag_category&post_type=wpag_audio_gallery2.206.66
WP Audio Gallery /wp-admin/options-general.php?page=wp-ag-setting2.205.60

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 52 new files
Database: 1 new table, 7 new options
New tables
wp_wpag_audios
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
wp_ag_options
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for WP AUDIO GALLERY
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,981 ▲21014.84 ▲0.556.13 ▲3.6044.46 ▲1.99
Dashboard /wp-admin2,263 ▲755.49 ▼0.40119.85 ▲16.4877.98 ▲28.97
Posts /wp-admin/edit.php2,160 ▲682.28 ▲0.2342.51 ▼2.1437.52 ▼5.09
Add New Post /wp-admin/post-new.php1,576 ▲4823.28 ▲5.00669.64 ▲17.0634.38 ▼16.58
Media Library /wp-admin/upload.php1,445 ▲574.49 ▲0.2590.38 ▼14.3286.05 ▲43.00
WP Audio Gallery /wp-admin/edit.php?post_type=wpag_audio_gallery1,1462.4540.0932.58
Add New /wp-admin/post-new.php?post_type=wpag_audio_gallery1,9723.8169.1189.39
Categories /wp-admin/edit-tags.php?taxonomy=wp_ag_category&post_type=wpag_audio_gallery1,3132.2930.6031.53
WP Audio Gallery /wp-admin/options-general.php?page=wp-ag-setting1,0152.2026.4430.98

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wp-audio-gallery/wp-audio-gallery.php+25
    Methods with the same name as their class will not be constructors in a future version of PHP; wpag_wp_Loader has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

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
These server-side errors were triggered
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-ag-setting
    • > Deprecated in wp-content/plugins/wp-audio-gallery/wp-audio-gallery.php+25
    Methods with the same name as their class will not be constructors in a future version of PHP; wpag_wp_Loader has a deprecated constructor
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-ag-setting
    • > Deprecated in wp-content/plugins/wp-audio-gallery/gallery/gallery.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; wpag_wp_gallery has a deprecated constructor
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-ag-setting
    • > Deprecated in wp-content/plugins/wp-audio-gallery/gallery/gallery-function.php+455
    Methods with the same name as their class will not be constructors in a future version of PHP; wp_Audio_List_Table has a deprecated constructor
    • > GET request to /wp-admin/edit.php?post_type=wpag_audio_gallery
    • > Notice in wp-content/plugins/wp-audio-gallery/gallery/gallery.php+136
    Undefined variable: colums
    • > GET request to /wp-admin/edit.php?post_type=wpag_audio_gallery
    • > Warning in wp-content/plugins/wp-audio-gallery/gallery/gallery.php+136
    count(): Parameter must be an array or an object that implements Countable

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
Almost there! Just fix the following items
  • 11× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-audio-gallery/wp-audio-gallery.php on line 177
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-audio-gallery/gallery/gallery-function.php on line 453
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-audio-gallery/gallery/gallery-function.php on line 453
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-audio-gallery/lib/audioDB.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-audio-gallery/gallery/gallery-function.php on line 453
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/wp-audio-gallery/wp-audio-gallery.php:181
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/wp-audio-gallery/gallery/gallery-function.php on line 453
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/wp-audio-gallery/gallery/gallery-function.php on line 453
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-audio-gallery/gallery/single-ag_reviews.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-audio-gallery/gallery/archive-ag_reviews.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: music, audio player, mp3, playlist, audio...

wp-audio-gallery/wp-audio-gallery.php 92% from 13 tests

Analyzing the main PHP file in "WP AUDIO GALLERY" version 2.0
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 174 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected8,472 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript171,1681,0196,175
PHP9756701,744
CSS371762553

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity25.67
▷ Minimum class complexity5.00
▷ Maximum class complexity43.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods36
▷ Static methods00.00%
▷ Public methods36100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions33
▷ Named functions33100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
17 PNG files occupy 0.16MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
gallery/images/music_icon_16.png3.30KB0.69KB▼ 78.97%
lib/jPlayer/skin/blue.monday/jplayer.blue.monday.png34.35KB9.59KB▼ 72.09%
lib/jPlayer/skin/blue.monday/jplayer.blue.monday.video.play.png17.28KB4.28KB▼ 75.21%
images/audio-down-16.png3.19KB0.83KB▼ 73.91%
images/forward.png17.30KB11.28KB▼ 34.77%