68% doshii

Code Review | Doshii

WordPress plugin Doshii scored68%from 54 tests.

About plugin

  • Plugin page: doshii
  • Plugin version: 2.5.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Sep 23, 2020
  • Latest release: Jul 4, 2023
  • Number of updates: 65
  • Update frequency: every 15.6 days
  • Top authors: doshii (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,331 total downloads

Benchmarks

Plugin footprint 65% 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: ▼4.22ms] 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 /3.58 ▲0.1243.29 ▲6.26
Dashboard /wp-admin3.58 ▲0.2748.28 ▼4.92
Posts /wp-admin/edit.php3.69 ▲0.3346.82 ▼2.11
Add New Post /wp-admin/post-new.php6.16 ▲0.2785.20 ▼11.09
Media Library /wp-admin/upload.php3.50 ▲0.2736.87 ▲1.26
Doshii Settings /wp-admin/options-general.php?page=doshii-settings3.4435.90

Server storage [IO: ▲0.22MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 17 new files
Database: 4 new tables, 6 new options
New tables
wp_doshii_menu
wp_doshii_product_option
wp_doshii_product_variant
wp_doshii_product
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Doshii
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.27 ▼0.011.85 ▲0.2844.46 ▲4.50
Dashboard /wp-admin2,199 ▲255.50 ▼0.2681.84 ▼4.6836.64 ▼6.09
Posts /wp-admin/edit.php2,104 ▲41.99 ▲0.0332.71 ▼1.3631.92 ▼4.58
Add New Post /wp-admin/post-new.php1,537 ▲718.10 ▼5.02607.48 ▼72.3079.78 ▲16.29
Media Library /wp-admin/upload.php1,404 ▲44.17 ▼0.04104.36 ▲5.1148.47 ▲4.88
Doshii Settings /wp-admin/options-general.php?page=doshii-settings9312.0023.8726.19

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% 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_menu
    • wp_doshii_product_option
    • wp_doshii_product
    • wp_doshii_product_variant
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

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
  • 8 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+299
    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 plugin_dir_url() in wp-content/plugins/doshii/doshii_function.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/doshii/include/woo-doshii-ajax.php:10

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.5.7 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,765 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP132181501,765

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.49
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
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
include/assets/images/doshii_logo.png52.03KB17.68KB▼ 66.01%