90% change-shipping-label

Code Review | Change Shipping Label

WordPress plugin Change Shipping Label scored 90% from 54 tests.

About plugin

  • Plugin page: change-shipping-l...
  • Plugin version: 1.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.7
  • WordPress version: 6.3.1
  • First release: Dec 23, 2020
  • Latest release: Apr 8, 2021
  • Number of updates: 4
  • Update frequency: every 26.7 days
  • Top authors: bloggingwelt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 397 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
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Change Shipping Label
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.12 ▼9.40
Dashboard /wp-admin3.32 ▲0.0243.47 ▼4.85
Posts /wp-admin/edit.php3.37 ▲0.0244.86 ▼4.11
Add New Post /wp-admin/post-new.php5.90 ▲0.0286.64 ▼15.80
Media Library /wp-admin/upload.php3.24 ▲0.0232.50 ▼0.18
Change Shipping Labels /wp-admin/admin.php?page=change-shipping-labels3.2132.20

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Change Shipping Label
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.47 ▼0.201.64 ▼0.2238.46 ▼0.51
Dashboard /wp-admin2,206 ▲215.88 ▼0.02107.00 ▲4.8944.19 ▼2.01
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0739.69 ▼1.5736.19 ▲1.95
Add New Post /wp-admin/post-new.php1,534 ▼1023.14 ▲4.88617.58 ▲11.1653.76 ▼15.46
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.1394.13 ▼7.7839.39 ▼6.80
Change Shipping Labels /wp-admin/admin.php?page=change-shipping-labels8442.0625.6927.95

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: checkout, cart, customization, woocommerce, shipping...

change-shipping-label/change-shipping-label.php Passed 13 tests

The main PHP script in "Change Shipping Label" version 1.2 is automatically included on every request by WordPress
77 characters long description:
A simple plugin for changing shipping labels in WooCommece cart and checkout.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected162 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24837162

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
There were not PNG files found in your plugin