68% eship

Code Review | eShip

WordPress plugin eShip scored68%from 54 tests.

About plugin

  • Plugin page: eship
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.2.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.9
  • WordPress version: 6.3.1
  • First release: Mar 17, 2022
  • Latest release: Oct 25, 2023
  • Number of updates: 28
  • Update frequency: every 21.0 days
  • Top authors: juanmaleal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /398 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼22.74ms] Passed 4 tests

An overview of server-side resources used by eShip
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.98 ▼4.68
Dashboard /wp-admin3.33 ▼0.0144.38 ▼19.90
Posts /wp-admin/edit.php3.38 ▲0.0342.75 ▼5.99
Add New Post /wp-admin/post-new.php5.91 ▲0.0379.45 ▼60.40
Media Library /wp-admin/upload.php3.26 ▲0.0345.65 ▲11.55

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 79 new files
Database: 2 new tables, 6 new options
New tables
wp_eship_dimensions
wp_eship_data
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for eShip
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲4614.17 ▼0.181.59 ▼0.0641.73 ▼3.46
Dashboard /wp-admin2,195 ▲215.57 ▼0.0181.60 ▼5.5538.93 ▼3.74
Posts /wp-admin/edit.php2,103 ▲31.95 ▼0.0834.32 ▼5.9434.66 ▼3.50
Add New Post /wp-admin/post-new.php1,529 ▼2223.10 ▲4.91636.02 ▲43.1248.74 ▼10.70
Media Library /wp-admin/upload.php1,403 ▼04.23 ▲0.05143.69 ▲48.9146.78 ▲5.91

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 fix the following items
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/eship/admin/partials/connection/connection.php
    • > /wp-content/plugins/eship/admin/partials/connection/_form_connection.php
    • > /wp-content/plugins/eship/admin/partials/buttons_modals/modal_custom.php
    • > /wp-content/plugins/eship/admin/partials/modals/modal_bulk_eship.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/eship/admin/partials/buttons_modals/shipment_sheet.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/eship/admin/partials/connection/dashboard_connection.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/eship/admin/partials/buttons_modals/buttons.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4 in eship/assets to your readme.txt
You can look at the official readme.txt

eship/eship.php 92% from 13 tests

The main PHP script in "eShip" version 1.0.2 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
There were no executable files found in this plugin14,738 lines of code in 50 files:
LanguageFilesBlank linesComment linesLines of code
SVG3009,552
PHP316261,0814,067
JavaScript95265888
Markdown2560151
CSS5192480

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity18.18
▷ Minimum class complexity1.00
▷ Maximum class complexity173.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes00.00%
Methods167
▷ Static methods21.20%
▷ Public methods12172.46%
▷ Protected methods2011.98%
▷ Private methods2615.57%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants11
▷ Global constants545.45%
▷ Class constants654.55%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
14 PNG files occupy 0.27MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/paqueterias/moova.png31.33KB15.34KB▼ 51.02%
admin/img/paqueterias/dhl.png5.76KB3.51KB▼ 38.98%
admin/img/eshipw.png9.93KB4.60KB▼ 53.72%
admin/img/paqueterias/usps.png18.35KB8.10KB▼ 55.84%
admin/img/woocommerce.png17.00KB8.43KB▼ 50.43%