10% dj-on-air-widget

Code Review | DJ On Air Widget

WordPress plugin DJ On Air Widget scored10%from 54 tests.

About plugin

  • Plugin page: dj-on-air-widget
  • Plugin version: 0.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.0-3.3
  • WordPress version: 6.3.1
  • First release: Sep 3, 2011
  • Latest release: Jun 26, 2020
  • Number of updates: 14
  • Update frequency: every 229.9 days
  • Top authors: kionae (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /7,694 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/dj-on-air-widget/dj-on-air.php+450
    Methods with the same name as their class will not be constructors in a future version of PHP; DJ_Widget has a deprecated constructor

Server metrics [RAM: ▼1.78MB] [CPU: ▼57.88ms] Passed 4 tests

Analyzing server-side resources used by DJ On Air Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.22 ▼1.244.56 ▼37.01
Dashboard /wp-admin2.24 ▼1.115.86 ▼58.26
Posts /wp-admin/edit.php2.24 ▼1.126.68 ▼42.71
Add New Post /wp-admin/post-new.php2.24 ▼3.655.97 ▼93.55
Media Library /wp-admin/upload.php2.24 ▼0.996.05 ▼29.03
DJ On-Air /wp-admin/options-general.php?page=dj-on-air-widget2.246.47

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_dj_widget
db_upgraded
widget_theysaidso_widget
dj_access_roles

Browser metrics Passed 4 tests

Checking browser requirements for DJ On Air Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.20 ▼0.421.52 ▼0.2637.52 ▼3.34
Dashboard /wp-admin2,199 ▲195.64 ▼0.0192.52 ▲3.9138.49 ▼4.62
Posts /wp-admin/edit.php2,104 ▲41.99 ▼0.0339.67 ▲1.3037.03 ▲0.80
Add New Post /wp-admin/post-new.php1,543 ▲1718.14 ▼4.94629.10 ▼55.2255.50 ▲0.43
Media Library /wp-admin/upload.php1,407 ▲74.25 ▲0.0399.81 ▲2.9444.20 ▼2.46
DJ On-Air /wp-admin/options-general.php?page=dj-on-air-widget9241.9627.3629.54

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/dj-on-air-widget/dj-on-air.php+450
    Methods with the same name as their class will not be constructors in a future version of PHP; DJ_Widget has a deprecated constructor
  • This plugin does not fully uninstall, leaving 8 options in the database
    • dj_access_roles
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_dj_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=dj-on-air-widget
    • > Deprecated in wp-content/plugins/dj-on-air-widget/dj-on-air.php+450
    Methods with the same name as their class will not be constructors in a future version of PHP; DJ_Widget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=dj-on-air-widget
    • > Deprecated in wp-content/plugins/dj-on-air-widget/dj-on-air.php+687
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=dj-on-air-widget
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in DJ_Widget is deprecated since version 4.3.0! Use __construct() instead.

SRP 50% 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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dj-on-air-widget/dj-on-air.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% 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
4 plugin tags: scheduling, music, radio, dj

dj-on-air-widget/dj-on-air.php 92% from 13 tests

The main PHP file in "DJ On Air Widget" ver. 0.2.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:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("dj-on-air-widget.php" instead of "dj-on-air.php")

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
Success! There were no dangerous files found in this plugin569 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP19259538
CSS15231

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin