10% alopeyk-woocommerce-shipping

Code Review | Alopeyk WooCommerce Shipping

WordPress plugin Alopeyk WooCommerce Shipping scored10%from 54 tests.

About plugin

  • Plugin page: alopeyk-woocommer...
  • Plugin version: 2.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-5.3.2
  • WordPress version: 6.3.1
  • First release: Feb 3, 2018
  • Latest release: Apr 4, 2020
  • Number of updates: 24
  • Update frequency: every 33.8 days
  • Top authors: alopeyk (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active /6,920 total downloads

Benchmarks

Plugin footprint 57% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/alopeyk-woocommerce-shipping/includes/class-alopeyk-woocommerce-shipping-common.php+1653
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

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

An overview of server-side resources used by Alopeyk WooCommerce Shipping
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.97 ▼2.35
Dashboard /wp-admin3.31 ▲0.0046.98 ▼5.41
Posts /wp-admin/edit.php3.36 ▲0.0041.02 ▼8.68
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.42 ▼9.17
Media Library /wp-admin/upload.php3.23 ▲0.0040.94 ▲4.40

Server storage [IO: ▲0.89MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
It is recommended to fix the following issues
  • There were 1 file (0.00KB) illegally modified outside of "wp-content/plugins/alopeyk-woocommerce-shipping/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/alopeyk-woocommerce-shipping/public/partials/iran\331\200provinces_cities.json"
Filesystem: 89 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Alopeyk WooCommerce Shipping
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.55 ▼0.741.69 ▼0.0144.06 ▲0.98
Dashboard /wp-admin2,203 ▲155.83 ▲0.9297.84 ▼12.9041.20 ▼0.99
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0134.92 ▼4.5435.34 ▼0.90
Add New Post /wp-admin/post-new.php1,538 ▼423.25 ▲4.99671.62 ▲52.1651.68 ▲0.16
Media Library /wp-admin/upload.php1,391 ▲64.25 ▲0.0697.41 ▼15.3147.33 ▲2.24

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
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

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 | 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/alopeyk-woocommerce-shipping/vendor/alopeyk/alopeyk-api-php/index.develop.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: woocommerce, shop, shipping, delivery, alopeyk...

alopeyk-woocommerce-shipping/alopeyk-woocommerce-shipping.php 85% from 13 tests

"Alopeyk WooCommerce Shipping" version 2.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Git Repository: An alternative Git repository was detected
  • Requires at least: Required version must match the one declared in readme.txt ("4.4" instead of "2.6")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin13,121 lines of code in 70 files:
LanguageFilesBlank linesComment linesLines of code
PHP471,1641,8856,467
PO File27089402,068
JavaScript61,196552,039
CSS8107631,745
Markdown2790703
JSON40082
SVG10117

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity43.82
▷ Minimum class complexity1.00
▷ Maximum class complexity541.00
Average method complexity3.56
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes00.00%
Methods340
▷ Static methods4312.65%
▷ Public methods32395.00%
▷ Protected methods51.47%
▷ Private methods123.53%
Functions21
▷ Named functions628.57%
▷ Anonymous functions1571.43%
Constants11
▷ Global constants436.36%
▷ Class constants763.64%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/marker-small.png0.54KB0.37KB▼ 32.80%
admin/img/plate-automobile.png10.41KB4.78KB▼ 54.06%
admin/img/plate-motorbike.png5.22KB2.77KB▼ 46.88%
admin/img/logo.png1.89KB1.87KB▼ 0.98%
public/img/marker-small.png0.54KB0.37KB▼ 32.80%