78% doshii

Code Review | Doshii

WordPress plugin Doshii scored 78% from 54 tests.

About plugin

  • Plugin page: doshii
  • Plugin version: 2.4.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8.0
  • WordPress version: 5.8.1
  • First release: Sep 23, 2020
  • Latest release: Aug 24, 2021
  • Number of updates: 41
  • Update frequency: every 8.2 days
  • Top authors: doshii (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,225 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.23MB] [CPU: ▼140.34ms] Passed 4 tests

An overview of server-side resources used by Doshii
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.93 ▲0.2036.67 ▲12.45
Dashboard /wp-admin3.31 ▲0.2550.09 ▲0.32
Posts /wp-admin/edit.php3.36 ▲0.2539.23 ▼5.84
Add New Post /wp-admin/post-new.php5.66 ▲0.2398.06 ▼558.11
Media Library /wp-admin/upload.php3.25 ▲0.2437.40 ▲2.26
Doshii Settings /wp-admin/options-general.php?page=doshii-settings3.2027.74

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 17 new files
Database: 4 new tables, no new options
New tables
wp_doshii_product_variant
wp_doshii_product
wp_doshii_menu
wp_doshii_product_option

Browser metrics Passed 4 tests

An overview of browser requirements for Doshii
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8815.96 ▲0.398.05 ▼1.9548.41 ▼2.81
Dashboard /wp-admin2,978 ▲475.93 ▼0.09142.94 ▼12.73123.77 ▲11.64
Posts /wp-admin/edit.php2,744 ▲52.68 ▼0.0166.96 ▼4.8394.14 ▲1.16
Add New Post /wp-admin/post-new.php1,686 ▲318.69 ▼0.00379.30 ▼31.08114.70 ▲1.88
Media Library /wp-admin/upload.php1,812 ▲55.01 ▼0.02153.85 ▼10.74127.33 ▼4.48
Doshii Settings /wp-admin/options-general.php?page=doshii-settings1,1782.1058.7884.14

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 4 tables in the database
    • wp_doshii_product
    • wp_doshii_product_option
    • wp_doshii_product_variant
    • wp_doshii_menu

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
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=doshii-settings
    • > Notice in wp-content/plugins/doshii/include/settings.php+270
    Trying to access array offset on value of type bool

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
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/doshii/include/woo-doshii-ajax.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/doshii/doshii_function.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add an image for screenshot #1 (None)
You can look at the official readme.txt

doshii/doshii_function.php 92% from 13 tests

The main PHP file in "Doshii" ver. 2.4.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("doshii.php" instead of "doshii_function.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin1,539 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP132021311,539

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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