83% instashipping

Code Review | instashipping

WordPress plugin instashipping scored83%from 54 tests.

About plugin

  • Plugin page: instashipping
  • Plugin version: 4.3.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.9.3
  • WordPress version: 6.3.1
  • First release: May 11, 2022
  • Latest release: May 31, 2022
  • Number of updates: 21
  • Update frequency: every 1.9 days
  • Top authors: instadispatch (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /394 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
Installer ran successfully

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

Analyzing server-side resources used by instashipping
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0048.18 ▲5.23
Dashboard /wp-admin3.31 ▼0.0450.17 ▼7.53
Posts /wp-admin/edit.php3.36 ▲0.0045.85 ▲0.72
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.98 ▼1.99
Media Library /wp-admin/upload.php3.23 ▲0.0035.17 ▲3.03

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 44 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for instashipping
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲3914.34 ▲0.081.78 ▼0.0243.74 ▲0.54
Dashboard /wp-admin2,198 ▲215.52 ▼0.1083.40 ▼3.5438.02 ▼5.16
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0537.44 ▲1.2336.92 ▲4.45
Add New Post /wp-admin/post-new.php1,526 ▼1123.10 ▲4.59657.44 ▲1.6250.98 ▼16.25
Media Library /wp-admin/upload.php1,403 ▲34.16 ▼0.0397.07 ▼4.1743.53 ▲0.31

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/instashipping/public/partials/instaship-public-display.php

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

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Set Live api key.), #2 (Create shipment of order.), #3 (order grid view.), #4 (Select desire service to book shipment.), #5 (Edit view of the shipment.), #6 (Booked shipment with selected service.), #7 (Download or print label pdf.)
Please take inspiration from this readme.txt

instashipping/instaship.php 77% from 13 tests

The main file in "instashipping" v. 4.3.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("instashipping.php" instead of "instaship.php")
  • Requires at least: The required version number must match the one declared in readme.txt ("5.7.3" instead of "5.6")
  • Text Domain: The text domain must be the same as the plugin slug, although 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
Good job! No executable or dangerous file extensions detected2,527 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP152796291,171
CSS315122768
JavaScript35647532
XML30056

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity11.56
▷ Minimum class complexity1.00
▷ Maximum class complexity45.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods51
▷ Static methods23.92%
▷ Public methods4690.20%
▷ Protected methods00.00%
▷ Private methods59.80%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
13 PNG files occupy 1.52MB with 0.52MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Screenshot-1.png214.93KB85.12KB▼ 60.40%
icon-128x128.png5.30KB2.77KB▼ 47.68%
admin/img/cancel1.png0.33KB0.33KB▼ 0.59%
Screenshot-4.png148.33KB58.82KB▼ 60.35%
admin/img/cancel.png0.73KB0.72KB▼ 1.61%