83% wc-apc-overnight-shipment-tracking

Code Review | Shipment & Tracking with APC Overnight

WordPress plugin Shipment & Tracking with APC Overnight scored83%from 54 tests.

About plugin

  • Plugin page: wc-apc-overnight-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2-6.0
  • WordPress version: 6.3.1
  • First release: Oct 5, 2022
  • Latest release: Oct 5, 2022
  • Number of updates: 2
  • Update frequency: every 23.5 days
  • Top authors: tricasol (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /178 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼16.58ms] Passed 4 tests

Analyzing server-side resources used by Shipment & Tracking with APC Overnight
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0636.26 ▼5.76
Dashboard /wp-admin3.36 ▲0.0248.28 ▼23.30
Posts /wp-admin/edit.php3.41 ▲0.0648.00 ▼3.49
Add New Post /wp-admin/post-new.php5.94 ▲0.0686.73 ▼33.75
Media Library /wp-admin/upload.php3.28 ▲0.0538.45 ▲4.48

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

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

Browser metrics Passed 4 tests

Shipment & Tracking with APC Overnight: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.30 ▲0.001.77 ▼0.1043.46 ▲2.58
Dashboard /wp-admin2,192 ▲185.59 ▼0.1081.41 ▼21.1041.63 ▼1.45
Posts /wp-admin/edit.php2,097 ▼01.99 ▼0.0436.22 ▼3.8734.38 ▼4.48
Add New Post /wp-admin/post-new.php1,545 ▲1423.38 ▲0.28683.34 ▲29.5652.19 ▲0.04
Media Library /wp-admin/upload.php1,400 ▼04.20 ▲0.0097.39 ▼24.3142.05 ▼10.62

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wc-apc-overnight-shipment-tracking/apc-overnight-shipping.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: No valid plugin tags found
  • Screenshots: Add an image for screenshot #1 (![settings screenshot](admin.php?page=wc-settings&tab=shipping§ion=apc "APC Shipping"))
  • Donate link: Invalid URI ("#")
The official readme.txt might help

wc-apc-overnight-shipment-tracking/apc-overnight-shipping.php 77% from 13 tests

The primary PHP file in "Shipment & Tracking with APC Overnight" version 1.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 153 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wc-apc-overnight-shipment-tracking.php" instead of "apc-overnight-shipping.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin430 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP14640358
CSS17054
JavaScript11018

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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