87% orders-track-parcel

Code Review | Orders Track Parcel

WordPress plugin Orders Track Parcel scored 87% from 54 tests.

About plugin

  • Plugin page: orders-track-parcel
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.2-4.9.1
  • WordPress version: 5.8.1
  • First release: Nov 30, 2017
  • Latest release: Nov 30, 2017
  • Number of updates: 2
  • Update frequency: every 14.5 days
  • Top authors: codegranite (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 460 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼148.32ms] Passed 4 tests

A check of server-side resources used by Orders Track Parcel
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1540.42 ▲16.04
Dashboard /wp-admin3.10 ▲0.0448.44 ▼10.12
Posts /wp-admin/edit.php3.15 ▲0.0445.90 ▼5.19
Add New Post /wp-admin/post-new.php5.46 ▲0.0293.48 ▼579.78
Media Library /wp-admin/upload.php3.04 ▲0.0336.79 ▲1.80

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Orders Track Parcel
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.80 ▲0.158.43 ▲0.8150.84 ▲1.12
Dashboard /wp-admin2,973 ▲425.88 ▼0.06139.56 ▼13.10106.54 ▼13.46
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.0069.32 ▼2.3594.84 ▲2.70
Add New Post /wp-admin/post-new.php1,594 ▼2118.84 ▼2.39384.58 ▲96.40115.79 ▲2.83
Media Library /wp-admin/upload.php1,804 ▼35.05 ▲0.07160.59 ▲3.94128.49 ▼5.67

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

Smoke tests 50% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/orders-track-parcel/woocommerce-orders-parcel.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: parcel_links in wp-content/plugins/orders-track-parcel/pages/tracking-form.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/orders-track-parcel/pages/tracking-form.php:13
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/orders-track-parcel/pages/tracking-form.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === orders-track-parcel === )
The official readme.txt might help

orders-track-parcel/woocommerce-orders-parcel.php 77% from 13 tests

The principal PHP file in "Orders Track Parcel" v. 1.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 168 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("orders-track-parcel.php" instead of "woocommerce-orders-parcel.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected177 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP2011129
JavaScript26033
CSS21015

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.22
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected