10% dx-advanced-widgets

Code Review | DX-Advanced-Widgets

WordPress plugin DX-Advanced-Widgets scored10%from 54 tests.

About plugin

  • Plugin page: dx-advanced-widgets
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.5
  • WordPress version: 6.3.1
  • First release: Nov 8, 2012
  • Latest release: Jan 10, 2013
  • Number of updates: 8
  • Update frequency: every 8.3 days
  • Top authors: daxiawp (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,588 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/dx-advanced-widgets/dx-advanced-widgets.php+16
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼50.98ms] Passed 4 tests

Analyzing server-side resources used by DX-Advanced-Widgets
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.42 ▼37.40
Dashboard /wp-admin2.05 ▼1.267.63 ▼46.41
Posts /wp-admin/edit.php2.05 ▼1.315.01 ▼39.44
Add New Post /wp-admin/post-new.php2.05 ▼3.845.37 ▼80.67
Media Library /wp-admin/upload.php2.05 ▼1.186.74 ▼25.58

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_dx_custom_articles_list

Browser metrics Passed 4 tests

A check of browser resources used by DX-Advanced-Widgets
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.29 ▼1.112.02 ▲0.2844.81 ▲0.04
Dashboard /wp-admin2,209 ▲185.90 ▲1.06104.79 ▼13.1141.73 ▼4.49
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0239.80 ▲3.5039.15 ▲6.75
Add New Post /wp-admin/post-new.php1,536 ▲323.27 ▼0.06659.24 ▲20.7869.40 ▲16.39
Media Library /wp-admin/upload.php1,388 ▼04.20 ▼0.0194.97 ▼5.8443.81 ▼0.37

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/dx-advanced-widgets/dx-advanced-widgets.php+16
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_dx_custom_articles_list
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/dx-advanced-widgets/extension/custom-articles-list/custom_articles_list.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/dx-advanced-widgets/extension/custom-articles-list/widget.php:4
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/dx-advanced-widgets/extension/custom-articles-list/widget.php on line 54
    • > PHP Warning
      extract() expects parameter 1 to be array, null given in wp-content/plugins/dx-advanced-widgets/extension/custom-articles-list/widget.php on line 3
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/dx-advanced-widgets/extension/custom-articles-list/widget.php on line 37
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/dx-advanced-widgets/extension/custom-articles-list/custom_articles_list.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/dx-advanced-widgets/extension/custom-articles-list/form.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: sidebar, widgets, widget, custom widget

dx-advanced-widgets/dx-advanced-widgets.php Passed 13 tests

"DX-Advanced-Widgets" version 1.2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
77 characters long description:
Collection of advanced features of the widget. 小工具高级功能集合。

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin317 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP43545229
PO File1293174
JavaScript13114

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods685.71%
▷ Protected methods00.00%
▷ Private methods114.29%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin