84% delivery-rate-for-yamato-transport

Code Review | Delivery rate for Yamato transport

WordPress plugin Delivery rate for Yamato transport scored84%from 54 tests.

About plugin

  • Plugin page: delivery-rate-for...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4.1
  • WordPress version: 6.3.1
  • First release: Oct 20, 2015
  • Latest release: May 16, 2020
  • Number of updates: 11
  • Update frequency: every 151.8 days
  • Top authors: RESTA (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,001 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼9.17ms] Passed 4 tests

A check of server-side resources used by Delivery rate for Yamato transport
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0545.13 ▲1.16
Dashboard /wp-admin3.35 ▲0.0150.80 ▼16.46
Posts /wp-admin/edit.php3.40 ▲0.0550.15 ▼1.86
Add New Post /wp-admin/post-new.php5.93 ▲0.0588.18 ▼15.34
Media Library /wp-admin/upload.php3.27 ▲0.0536.46 ▼3.01

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Delivery rate for Yamato transport: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.37 ▼0.191.84 ▲0.1142.56 ▼2.04
Dashboard /wp-admin2,198 ▲215.63 ▼0.0986.74 ▼6.3644.30 ▲5.05
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0636.22 ▼4.1435.41 ▼1.16
Add New Post /wp-admin/post-new.php1,526 ▼223.32 ▲0.18651.33 ▼26.1554.24 ▼3.35
Media Library /wp-admin/upload.php1,400 ▼04.15 ▼0.1197.22 ▼4.5542.10 ▼1.76

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/delivery-rate-for-yamato-transport/delivery-rate-for-yamato.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Admin Panel Shipping.), #2 (The contents of the cart.)
The official readme.txt is a good inspiration

delivery-rate-for-yamato-transport/delivery-rate-for-yamato.php 92% from 13 tests

The primary PHP file in "Delivery rate for Yamato transport" version 1.0.2 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("delivery-rate-for-yamato-transport.php" instead of "delivery-rate-for-yamato.php")

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 detected298 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11049230
PO File1293468

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.77
Average class complexity49.00
▷ Minimum class complexity49.00
▷ Maximum class complexity49.00
Average method complexity10.60
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.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

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png36.71KB16.73KB▼ 54.43%
screenshot-2.png9.22KB3.51KB▼ 61.94%