77% advanced-dewplayer

Code Review | Advanced Dewplayer

WordPress plugin Advanced Dewplayer scored77%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: 6.3.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,528 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.12MB] [CPU: ▼4.32ms] Passed 4 tests

This is a short check of server-side resources used by Advanced Dewplayer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1140.52 ▼4.84
Dashboard /wp-admin3.44 ▲0.0953.67 ▼12.61
Posts /wp-admin/edit.php3.56 ▲0.2052.79 ▲3.83
Add New Post /wp-admin/post-new.php6.04 ▲0.1595.42 ▼3.67
Media Library /wp-admin/upload.php3.37 ▲0.1340.19 ▲4.78

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
dew_display_options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Dewplayer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲5014.26 ▼0.271.62 ▼0.1242.44 ▼3.20
Dashboard /wp-admin2,196 ▲195.58 ▼0.0791.25 ▼6.2435.90 ▼10.73
Posts /wp-admin/edit.php2,121 ▲212.30 ▲0.3148.77 ▲10.9636.66 ▲1.44
Add New Post /wp-admin/post-new.php1,531 ▲523.23 ▲0.12663.94 ▲47.1739.37 ▼19.75
Media Library /wp-admin/upload.php1,417 ▲204.31 ▲0.1097.72 ▼8.9442.25 ▼4.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
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 errors when accessed directly:
    • > 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
    • > 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.id3v1.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.lyrics3.php:18
    • > PHP Notice
      Undefined index: dirname in wp-content/plugins/advanced-dewplayer/includes/download-file.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/advanced-dewplayer/advanceddewplayer.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'getid3_handler' not found in wp-content/plugins/advanced-dewplayer/library/module.tag.apetag.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

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

The principal PHP file in "Advanced Dewplayer" v. 1.6 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 226 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • 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 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin7,154 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP121,4222,5627,086
CSS18155
JavaScript13113

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Cyclomatic complexity of methods 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

Using a strong compression for your PNG files is a great way to speed-up 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%