83% zbplayer

Code Review | zbPlayer

WordPress plugin zbPlayer scored83%from 54 tests.

About plugin

  • Plugin page: zbplayer
  • Plugin version: 2.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.5
  • WordPress version: 6.3.1
  • First release: Jan 16, 2013
  • Latest release: Sep 30, 2020
  • Number of updates: 128
  • Update frequency: every 22.0 days
  • Top authors: zubaka (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

600+ active /34,950 total downloads

Benchmarks

Plugin footprint 83% from 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 gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.53ms] Passed 4 tests

Analyzing server-side resources used by zbPlayer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1039.97 ▲1.03
Dashboard /wp-admin3.38 ▲0.0844.76 ▼2.05
Posts /wp-admin/edit.php3.43 ▲0.0842.12 ▼5.32
Add New Post /wp-admin/post-new.php5.96 ▲0.0881.69 ▼11.20
Media Library /wp-admin/upload.php3.31 ▲0.0834.58 ▲0.46
zbPlayer /wp-admin/options-general.php?page=zbplayer3.3331.64

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 28 new options
New WordPress options
can_compress_scripts
zbp_native_desktop
zbp_version
zbp_bg_left_color
zbp_icon_right_hover_color
zbp_volslider_color
zbp_loader_color
widget_recent-posts
zbp_text_color
zbp_border_color
...

Browser metrics Passed 4 tests

Checking browser requirements for zbPlayer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.63 ▲0.232.38 ▲0.7338.56 ▼5.65
Dashboard /wp-admin2,202 ▲245.58 ▼0.1182.34 ▼18.1237.10 ▼5.95
Posts /wp-admin/edit.php2,101 ▲11.95 ▼0.0234.52 ▼3.0633.72 ▼2.42
Add New Post /wp-admin/post-new.php1,529 ▲322.96 ▼0.16648.95 ▲0.9765.71 ▲12.71
Media Library /wp-admin/upload.php1,404 ▲74.28 ▲0.0993.39 ▼1.5841.81 ▼0.58
zbPlayer /wp-admin/options-general.php?page=zbplayer1,5312.0333.7735.24

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% 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)
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/zbplayer/zbPlayer.admin.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/zbplayer/zbPlayer.php:40

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
10 plugin tags: cyrillic mp3 player, mp3 player, wav player, flash player, small mp3 player...

zbplayer/zbPlayer.php 77% from 13 tests

The entry point to "zbPlayer" version 2.4.2 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("zbplayer.php" instead of "zbPlayer.php")
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages")
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected596 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP35797475
PO File551580
JavaScript21337
CSS2004

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants23
▷ Global constants23100.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 files were detected