84% time-express

Code Review | Time Express Parcels For WooCommerce

WordPress plugin Time Express Parcels For WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: time-express
  • Plugin version: 1.0.9
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.1.1
  • WordPress version: 6.3.1
  • First release: May 17, 2021
  • Latest release: Mar 8, 2023
  • Number of updates: 29
  • Update frequency: every 25.9 days
  • Top authors: laijis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /946 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.31ms] Passed 4 tests

Analyzing server-side resources used by Time Express Parcels For WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.75 ▼0.74
Dashboard /wp-admin3.31 ▲0.0052.57 ▲5.19
Posts /wp-admin/edit.php3.36 ▲0.0042.21 ▼6.51
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.21 ▼10.04
Media Library /wp-admin/upload.php3.23 ▲0.0036.25 ▲4.06

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

Input-output and database impact 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-comments
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Time Express Parcels For WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.26 ▼1.121.88 ▲0.1643.58 ▲5.59
Dashboard /wp-admin2,206 ▲184.86 ▼0.24106.06 ▼2.4539.32 ▼4.27
Posts /wp-admin/edit.php2,092 ▲31.98 ▼0.0234.58 ▼1.8330.63 ▼5.24
Add New Post /wp-admin/post-new.php1,542 ▲2218.23 ▼5.06589.60 ▼72.1354.60 ▼13.47
Media Library /wp-admin/upload.php1,388 ▼34.22 ▲0.02100.12 ▲2.4040.66 ▼2.01

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
Please take a closer look at the following
  • 8× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/time-express/utils/functions.php
    • > /wp-content/plugins/time-express/admin/timexpress-orders.php
    • > /wp-content/plugins/time-express/classes/class-timexpress-api.php
    • > /wp-content/plugins/time-express/admin/timexpress-settings/timexpress-user-settings.php
    • > /wp-content/plugins/time-express/admin/timexpress-login/login_logout.php
    • > /wp-content/plugins/time-express/timexpress-delivery.php
    • > /wp-content/plugins/time-express/classes/class-timexpress-shipping.php
    • > /wp-content/plugins/time-express/admin/timexpress-login/login-form.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: shipping, woocommerce, timexpress

time-express/timexpress-delivery.php 85% from 13 tests

"Time Express Parcels For WooCommerce" version 1.0.9's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.0" instead of "5.4")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("time-express.php" instead of "timexpress-delivery.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 plugin803 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP817582752
JavaScript12033
CSS12018

PHP code Passed 2 tests

A brief analysis 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.27
Average class complexity8.33
▷ Minimum class complexity6.00
▷ Maximum class complexity11.00
Average method complexity1.85
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods26
▷ Static methods726.92%
▷ Public methods26100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/imgs/icon.png2.24KB0.81KB▼ 63.91%
admin/timexpress-settings/logo.png32.48KB15.28KB▼ 52.95%
admin/timexpress-login/logo.png32.48KB15.28KB▼ 52.95%