10% urwa-for-dokan

Code Review | URWA for Dokan

WordPress plugin URWA for Dokan scored10%from 54 tests.

About plugin

  • Plugin page: urwa-for-dokan
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.3.1
  • WordPress version: 6.3.1
  • First release: Oct 27, 2015
  • Latest release: Oct 30, 2015
  • Number of updates: 15
  • Update frequency: every 0.7 days
  • Top authors: Rob Smelik (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,671 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/urwa-for-dokan/urwa-for-dokan.php+127
    Declaration of urwa_dokan_widget::widget() should be compatible with WP_Widget::widget($args, $instance)

Server metrics [RAM: ▼1.92MB] [CPU: ▼53.09ms] Passed 4 tests

Server-side resources used by URWA for Dokan
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.395.61 ▼36.59
Dashboard /wp-admin2.09 ▼1.216.31 ▼44.18
Posts /wp-admin/edit.php2.09 ▼1.266.04 ▼41.52
Add New Post /wp-admin/post-new.php2.09 ▼3.795.29 ▼90.07
Media Library /wp-admin/upload.php2.09 ▼1.145.48 ▼26.86

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_urwa_dokan_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for URWA for Dokan
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.74 ▲0.421.85 ▼0.0544.75 ▼3.63
Dashboard /wp-admin2,206 ▲185.86 ▼0.02110.91 ▼4.9041.46 ▼5.17
Posts /wp-admin/edit.php2,086 ▼32.01 ▲0.0234.24 ▼4.0138.49 ▲5.44
Add New Post /wp-admin/post-new.php1,533 ▲1923.18 ▲5.31662.68 ▼6.1054.68 ▼8.97
Media Library /wp-admin/upload.php1,391 ▼04.21 ▲0.0195.89 ▲0.3343.28 ▼0.27

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/urwa-for-dokan/urwa-for-dokan.php+127
    Declaration of urwa_dokan_widget::widget() should be compatible with WP_Widget::widget($args, $instance)
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_urwa_dokan_widget

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/urwa-for-dokan/urwa-for-dokan.php

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 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

urwa-for-dokan/urwa-for-dokan.php Passed 13 tests

The primary PHP file in "URWA for Dokan" version 1.0 is used by WordPress to initiate all plugin functionality
82 characters long description:
Selectively display widgets to logged in users based on standard Dokan user roles.

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
Good job! No executable or dangerous file extensions detected92 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3444392

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.74
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin