84% donden-gaeshi

Code Review | Donden Gaeshi - Name Order Changer for WooCommerce

WordPress plugin Donden Gaeshi - Name Order Changer for WooCommerce scored 84% from 54 tests.

About plugin

  • Plugin page: donden-gaeshi
  • Plugin version: 0.1.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Jun 28, 2019
  • Latest release: Jun 28, 2019
  • Number of updates: 8
  • Update frequency: N/A
  • Top authors: Takahashi_Fumiki (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 670 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.72ms] Passed 4 tests

Analyzing server-side resources used by Donden Gaeshi - Name Order Changer for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0245.33 ▼6.49
Dashboard /wp-admin3.32 ▲0.0149.85 ▲1.27
Posts /wp-admin/edit.php3.37 ▲0.0148.30 ▼2.09
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.97 ▼19.58
Media Library /wp-admin/upload.php3.24 ▲0.0138.22 ▲3.14

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Donden Gaeshi - Name Order Changer for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4314.74 ▼0.011.66 ▼0.6544.78 ▲2.58
Dashboard /wp-admin2,209 ▲184.88 ▼0.19110.09 ▲9.3541.50 ▲3.02
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0135.97 ▼3.5633.41 ▼4.14
Add New Post /wp-admin/post-new.php1,514 ▼2817.77 ▼0.41642.76 ▼1.9646.23 ▼13.91
Media Library /wp-admin/upload.php1,388 ▼34.25 ▲0.0194.08 ▼3.7342.08 ▼1.66

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 did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/donden-gaeshi/includes/woocommerce-account.php:11

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

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: localization, display_name, woocommerce, i18n, l10n

donden-gaeshi/donden-gaeshi.php 92% from 13 tests

Analyzing the main PHP file in "Donden Gaeshi - Name Order Changer for WooCommerce" version 0.1.4
You should first fix the following items:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected467 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP1081230413
XML141233
JSON20021

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity18.33
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity3.26
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods312.50%
▷ Public methods2395.83%
▷ Protected methods00.00%
▷ Private methods14.17%
Functions11
▷ Named functions654.55%
▷ Anonymous functions545.45%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin