78% dw-anything

Code Review | DW Anything

WordPress plugin DW Anything scored78%from 54 tests.

About plugin

  • Plugin page: dw-anything
  • Plugin version: 4.01.0002
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.7
  • WordPress version: 6.3.1
  • First release: Jan 14, 2017
  • Latest release: Jan 16, 2017
  • Number of updates: 5
  • Update frequency: every 2.0 days
  • Top authors: dwfactory (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /532 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼0.09ms] Passed 4 tests

A check of server-side resources used by DW Anything
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1145.76 ▲3.53
Dashboard /wp-admin3.42 ▲0.1154.35 ▲0.13
Posts /wp-admin/edit.php3.53 ▲0.1747.47 ▼2.43
Add New Post /wp-admin/post-new.php6.00 ▲0.1193.56 ▼0.91
Media Library /wp-admin/upload.php3.34 ▲0.1138.60 ▲2.86

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 43 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_dwanythingwidget
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for DW Anything
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.28 ▲0.091.74 ▼0.3844.82 ▼0.93
Dashboard /wp-admin2,198 ▲245.58 ▼0.0089.48 ▲0.7140.80 ▲1.10
Posts /wp-admin/edit.php2,100 ▼32.02 ▲0.0434.41 ▼5.7032.38 ▼4.01
Add New Post /wp-admin/post-new.php1,526 ▼1123.25 ▲5.13655.98 ▲34.5956.48 ▼12.98
Media Library /wp-admin/upload.php1,403 ▲34.17 ▼0.00101.11 ▲1.1643.43 ▲0.50

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_dwanythingwidget
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
  • 8× PHP files output text when accessed directly:
    • > /wp-content/plugins/dw-anything/classes/datasources/request.php
    • > /wp-content/plugins/dw-anything/classes/datasources/table.php
    • > /wp-content/plugins/dw-anything/classes/datasources/user.php
    • > /wp-content/plugins/dw-anything/controller.php
    • > /wp-content/plugins/dw-anything/dw-anything.php
    • > /wp-content/plugins/dw-anything/views/default.php
    • > /wp-content/plugins/dw-anything/classes/widgets/dwanything.php
    • > /wp-content/plugins/dw-anything/helper.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant JPATH_LIBRARIES - assumed 'JPATH_LIBRARIES' (this will throw an Error in a future version of PHP) in wp-content/plugins/dw-anything/libraries/import.legacy.php on line 87

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: dynamic widgets, dynamic widget, wordpress widget, custom widget, sql...

dw-anything/dw-anything.php 92% from 13 tests

This is the main PHP file of "DW Anything" version 4.01.0002, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin3,905 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP391,1063,6673,903
HTML2002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity16.29
▷ Minimum class complexity1.00
▷ Maximum class complexity78.00
Average method complexity3.24
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes34
▷ Abstract classes617.65%
▷ Concrete classes2882.35%
▷ Final classes00.00%
Methods242
▷ Static methods11145.87%
▷ Public methods21789.67%
▷ Protected methods229.09%
▷ Private methods31.24%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants41
▷ Global constants2560.98%
▷ Class constants1639.02%
▷ Public constants16100.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
There are no PNG files in this plugin