84% customize-dokan-dashboard-endpoints

Code Review | Customize Dokan Dashboard Endpoints

WordPress plugin Customize Dokan Dashboard Endpoints scored84%from 54 tests.

About plugin

  • Plugin page: customize-dokan-d...
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Mar 7, 2023
  • Latest release: Nov 16, 2023
  • Number of updates: 20
  • Update frequency: every 12.7 days
  • Top authors: phppoet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,611 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
Installer ran successfully

Server metrics [RAM: ▲0.26MB] [CPU: ▲3.42ms] Passed 4 tests

An overview of server-side resources used by Customize Dokan Dashboard Endpoints
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2543.90 ▲5.02
Dashboard /wp-admin3.56 ▲0.2652.53 ▲2.93
Posts /wp-admin/edit.php3.65 ▲0.3053.61 ▲5.45
Add New Post /wp-admin/post-new.php6.16 ▲0.27100.55 ▲0.28
Media Library /wp-admin/upload.php3.48 ▲0.2542.69 ▲9.99

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 49 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Customize Dokan Dashboard Endpoints: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3214.27 ▼0.081.92 ▲0.3240.22 ▲1.01
Dashboard /wp-admin2,202 ▲215.59 ▼0.1394.55 ▼14.2843.36 ▲2.04
Posts /wp-admin/edit.php2,107 ▲72.00 ▲0.0241.28 ▲3.0635.78 ▲0.34
Add New Post /wp-admin/post-new.php1,530 ▲323.11 ▼0.17671.39 ▲31.1958.94 ▲7.94
Media Library /wp-admin/upload.php1,404 ▲44.17 ▼0.02100.63 ▼5.1547.33 ▲4.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sysbasics\\is_admin() in wp-content/plugins/customize-dokan-dashboard-endpoints/lib/sysbasics/plugin-deactivation-survey/deactivate-feedback-form.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/customize-dokan-dashboard-endpoints/include/frontend/template.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/customize-dokan-dashboard-endpoints/include/cddep_extra_functions.php:430
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/customize-dokan-dashboard-endpoints/include/frontend/woocommerce_frontend_endpoint.php:8
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/customize-dokan-dashboard-endpoints/include/admin/forms/settings_form.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/customize-dokan-dashboard-endpoints/include/admin/admin_settings.php:17

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: menu, endpoints, dokan customize dashboard, dashboard, dokan

customize-dokan-dashboard-endpoints/customize-dokan-dashboard-endpoints.php Passed 13 tests

"Customize Dokan Dashboard Endpoints" version 1.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
46 characters long description:
Customize Customize Dokan Dashboard Endpoints.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin3,925 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
CSS132431312,059
PHP77851741,145
JavaScript925693721

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity80.50
▷ Minimum class complexity29.00
▷ Maximum class complexity132.00
Average method complexity8.57
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions1881.82%
▷ Anonymous functions418.18%
Constants7
▷ Global constants7100.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
7 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/ui-icons_cc0000_256x240.png4.57KB4.18KB▼ 8.43%
assets/css/images/ui-icons_777620_256x240.png4.57KB4.18KB▼ 8.43%
assets/images/icon.png0.75KB0.92KB0.00%
assets/css/images/ui-icons_555555_256x240.png6.91KB4.18KB▼ 39.47%
assets/css/images/ui-icons_ffffff_256x240.png6.33KB4.18KB▼ 33.99%