88% shiprocket

Code Review | Shiprocket

WordPress plugin Shiprocket scored88%from 54 tests.

About plugin

  • Plugin page: shiprocket
  • Plugin version: 2.0.2
  • PHP compatiblity: 4.8+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.1
  • WordPress version: 6.3.1
  • First release: Jan 5, 2017
  • Latest release: Oct 13, 2023
  • Number of updates: 80
  • Update frequency: every 30.9 days
  • Top authors: shiprocket (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

7,000+ active /94,236 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

An overview of server-side resources used by Shiprocket
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.20 ▼2.55
Dashboard /wp-admin3.31 ▲0.0050.36 ▲1.51
Posts /wp-admin/edit.php3.36 ▲0.0049.62 ▼3.59
Add New Post /wp-admin/post-new.php5.89 ▲0.0097.74 ▲1.86
Media Library /wp-admin/upload.php3.23 ▲0.0039.13 ▲0.94

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Shiprocket
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.011.58 ▼0.0140.15 ▼8.03
Dashboard /wp-admin2,195 ▲185.61 ▼0.0590.08 ▲0.4242.21 ▲2.07
Posts /wp-admin/edit.php2,103 ▲31.97 ▼0.0738.80 ▲0.9934.41 ▲0.08
Add New Post /wp-admin/post-new.php1,526 ▼023.56 ▲0.41673.57 ▼60.4553.41 ▼12.50
Media Library /wp-admin/upload.php1,403 ▲34.23 ▲0.11104.37 ▼10.4546.95 ▲0.74

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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 76% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4, #5, #6, #7, #8, #9 in shiprocket/assets to your readme.txt
  • Donate link: Please fix this invalid url: "shiprocket.in"
  • Tags: Please delete some tags, you are using 34 tag instead of maximum 10
The official readme.txt might help

shiprocket/class-shiprocket-woocommerce-shipping.php 69% from 13 tests

Analyzing the main PHP file in "Shiprocket" version 2.0.2
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: The description should be shorter than 140 characters (currently 181 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("shiprocket.php" instead of "class-shiprocket-woocommerce-shipping.php")
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.8" instead of "3.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected950 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP6178393950

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity22.00
▷ Minimum class complexity2.00
▷ Maximum class complexity74.00
Average method complexity4.22
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods33
▷ Static methods824.24%
▷ Public methods3090.91%
▷ Protected methods00.00%
▷ Private methods39.09%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin