87% advanced-dewplayer

Code Review | Advanced Dewplayer

WordPress plugin Advanced Dewplayer scored 87% from 54 tests.

About plugin

  • Plugin page: advanced-dewplayer
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.9.5
  • WordPress version: 5.8.1
  • First release: Jul 9, 2013
  • Latest release: May 11, 2018
  • Number of updates: 37
  • Update frequency: every 47.8 days
  • Top authors: westerndeal (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active / 13,154 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼149.87ms] Passed 4 tests

A check of server-side resources used by Advanced Dewplayer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.95 ▲0.2225.50 ▲5.96
Dashboard /wp-admin3.19 ▲0.1332.38 ▼6.08
Posts /wp-admin/edit.php3.31 ▲0.1930.37 ▼1.72
Add New Post /wp-admin/post-new.php5.56 ▲0.1168.70 ▼591.81
Media Library /wp-admin/upload.php3.14 ▲0.1322.91 ▲0.13

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 1 new option
New WordPress options
dew_display_options

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Dewplayer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,672 ▲4616.00 ▲0.045.02 ▼0.2276.61 ▲1.20
Dashboard /wp-admin2,933 ▲376.12 ▲0.02123.85 ▼20.29175.81 ▼81.25
Posts /wp-admin/edit.php2,766 ▲233.27 ▲0.0372.83 ▲6.84138.34 ▼8.36
Add New Post /wp-admin/post-new.php2,072 ▼1,74321.67 ▲2.89401.81 ▼17.46159.22 ▼7.02
Media Library /wp-admin/upload.php1,771 ▲225.53 ▲0.02147.67 ▼0.10183.14 ▲2.03

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 successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/advanced-dewplayer/includes/download-file.php
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'getid3_handler' not found in wp-content/plugins/advanced-dewplayer/library/module.tag.apetag.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/advanced-dewplayer/advanceddewplayer.php:14
    • > PHP Notice
      Undefined index: extension in wp-content/plugins/advanced-dewplayer/includes/download-file.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'getid3_handler' not found in wp-content/plugins/advanced-dewplayer/library/module.tag.lyrics3.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'getid3_lib' not found in wp-content/plugins/advanced-dewplayer/library/module.tag.id3v2.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'getid3_handler' not found in wp-content/plugins/advanced-dewplayer/library/module.tag.id3v1.php:18
    • > PHP Notice
      Undefined index: dirname in wp-content/plugins/advanced-dewplayer/includes/download-file.php on line 7
    • > PHP Notice
      Undefined index: dew_file in wp-content/plugins/advanced-dewplayer/includes/download-file.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'getid3_handler' not found in wp-content/plugins/advanced-dewplayer/library/module.audio.mp3.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 86% 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:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
You can take inspiration from this readme.txt

advanced-dewplayer/advanceddewplayer.php 77% from 13 tests

The main PHP file in "Advanced Dewplayer" ver. 1.6 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: Please keep the plugin description shorter than 140 characters (currently 226 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("advanced-dewplayer.php" instead of "advanceddewplayer.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected7,154 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP121,4222,5627,086
CSS18155
JavaScript13113

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Method cyclomatic complexity should be reduced to less than 100 (currently 353)
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity128.77
▷ Minimum class complexity1.00
▷ Maximum class complexity493.00
Average method complexity8.69
▷ Minimum method complexity1.00
▷ Maximum method complexity353.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes17.69%
▷ Concrete classes1292.31%
▷ Final classes00.00%
Methods217
▷ Static methods11452.53%
▷ Public methods20293.09%
▷ Protected methods83.69%
▷ Private methods73.23%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants22
▷ Global constants1881.82%
▷ Class constants418.18%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/download.png2.92KB2.29KB▼ 21.54%