10% malca-amit-shipping-services

Code Review | Malca-Amit Shipping Services

WordPress plugin Malca-Amit Shipping Services scored10%from 54 tests.

About plugin

  • Plugin page: malca-amit-shippi...
  • Plugin version: 1.03
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2.0-6.0
  • WordPress version: 6.3.1
  • First release: Feb 28, 2018
  • Latest release: Dec 19, 2022
  • Number of updates: 24
  • Update frequency: every 73.1 days
  • Top authors: liorma (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /986 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > User error in wp-content/plugins/malca-amit-shipping-services/malca.php+68
    Please contact your server administrator to enable SOAP client!

Server metrics [RAM: ▲0.16MB] [CPU: ▼9.52ms] Passed 4 tests

Analyzing server-side resources used by Malca-Amit Shipping Services
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1738.75 ▼1.63
Dashboard /wp-admin3.47 ▲0.1350.06 ▼15.88
Posts /wp-admin/edit.php3.59 ▲0.2351.59 ▼2.75
Add New Post /wp-admin/post-new.php6.05 ▲0.1784.60 ▼17.83
Media Library /wp-admin/upload.php3.40 ▲0.1742.40 ▲7.67
Orders /wp-admin/admin.php?page=Malca_Orders3.3432.32

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Malca-Amit Shipping Services
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲6813.98 ▼0.391.73 ▲0.0528.97 ▼13.99
Dashboard /wp-admin2,209 ▲355.80 ▲0.20104.67 ▲7.5676.43 ▲36.11
Posts /wp-admin/edit.php2,132 ▲292.87 ▲0.8437.67 ▼3.5734.83 ▼4.06
Add New Post /wp-admin/post-new.php1,554 ▲2824.13 ▲0.67652.95 ▼45.4232.24 ▼23.42
Media Library /wp-admin/upload.php1,426 ▲265.24 ▲1.01104.96 ▼6.0178.39 ▲28.57
Orders /wp-admin/admin.php?page=Malca_Orders7102.3812.3723.86

Uninstaller [IO: ▲2.90MB] [DB: ▲0.00MB] 25% 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
  • The plugin did not uninstall gracefully
    • > Error in wp-content/plugins/malca-amit-shipping-services/include/functions.php+15
    Uncaught Error: Class 'SoapClient' not found in wp-content/plugins/malca-amit-shipping-services/include/functions.php:15
    Stack trace:
    #0 wp-content/plugins/malca-amit-shipping-services/malca.php(89): Malca_SoapResponse()
    #1 wp-includes/class-wp-hook.php(310): DeactivateMalca()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/includes/plugin.php(816): do_action()
  • Uninstaller has failed for this plugin, leaving 161 files (2.90MB) in the plugin directory
    • (new file) PDFMerger.php
    • (new file) assets/css/font-awesome.css
    • (new file) assets/css/fontawesome.css
    • (new file) LICENSE.txt
    • (new file) assets/css/font-awesome.min.css
    • (new file) assets/css/fonts.css
    • (new file) assets/css/normalize.css
    • (new file) assets/css/common.css
    • (new file) assets/css/style.css
    • (new file) assets/css/jquery.datetimepicker.css
    • ...
  • Zombie WordPress options were found after uninstall: 7 options
    • recovery_mode_email_last_sent
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=Malca_Orders
    • > Error in wp-content/plugins/malca-amit-shipping-services/include/functions.php+15
    Uncaught Error: Class 'SoapClient' not found in wp-content/plugins/malca-amit-shipping-services/include/functions.php:15
    Stack trace:
    #0 wp-content/plugins/malca-amit-shipping-services/malca.php(140): Malca_SoapResponse()
    #1 wp-includes/class-wp-hook.php(310): Malca_amit_orders()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 {main}
    thrown

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 8× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/malca-amit-shipping-services/vendor/itbz/fpdf/tutorial/tuto2.php
    • > /wp-content/plugins/malca-amit-shipping-services/vendor/itbz/fpdf/tutorial/tuto6.php
    • > /wp-content/plugins/malca-amit-shipping-services/vendor/itbz/fpdf/tutorial/tuto1.php
    • > /wp-content/plugins/malca-amit-shipping-services/vendor/itbz/fpdf/tutorial/tuto7.php
    • > /wp-content/plugins/malca-amit-shipping-services/vendor/itbz/fpdf/tutorial/tuto5.php
    • > /wp-content/plugins/malca-amit-shipping-services/vendor/itbz/fpdf/tutorial/tuto4.php
    • > /wp-content/plugins/malca-amit-shipping-services/vendor/itbz/fpdf/tutorial/makefont.php
    • > /wp-content/plugins/malca-amit-shipping-services/vendor/itbz/fpdf/tutorial/tuto3.php
  • 13× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'fpdi\\pdf_parser' not found in wp-content/plugins/malca-amit-shipping-services/vendor/itbz/fpdi/src/fpdi/fpdi/pdf/parser.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'fpdf\\FPDF' not found in wp-content/plugins/malca-amit-shipping-services/vendor/itbz/fpdi/src/fpdi/fpdi/bridge.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/malca-amit-shipping-services/include/autoload.php:4
    • > PHP Notice
      Undefined index: type in wp-content/plugins/malca-amit-shipping-services/include/download.php on line 7
    • > PHP Notice
      Undefined index: type in wp-content/plugins/malca-amit-shipping-services/include/download.php on line 29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/malca-amit-shipping-services/include/functions.php:41
    • > PHP Notice
      Undefined variable: oid in wp-content/plugins/malca-amit-shipping-services/template/order_bulk_return.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'fpdi\\FPDF_TPL' not found in wp-content/plugins/malca-amit-shipping-services/vendor/itbz/fpdi/src/fpdi/FPDI.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'fpdf\\FPDF' not found in wp-content/plugins/malca-amit-shipping-services/vendor/itbz/fpdf/src/fpdf/FPDF/EXTENDED.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'fpdi\\fpdi_bridge' not found in wp-content/plugins/malca-amit-shipping-services/vendor/itbz/fpdi/src/fpdi/FPDF/TPL.php:25

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Donate link: Invalid url: ""
You can look at the official readme.txt

malca-amit-shipping-services/malca.php 85% from 13 tests

This is the main PHP file of "Malca-Amit Shipping Services" version 1.03, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("malca-amit-shipping-services.php" instead of "malca.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.0.1" instead of "2.2.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin19,313 lines of code in 85 files:
LanguageFilesBlank linesComment linesLines of code
PHP581,0352,0367,074
CSS81902485,996
SVG1002,671
JavaScript3249862,436
HTML8430922
JSON30098
Markdown325071
Bourne Shell1101045

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity35.12
▷ Minimum class complexity1.00
▷ Maximum class complexity310.00
Average method complexity4.32
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes24
▷ Abstract classes00.00%
▷ Concrete classes24100.00%
▷ Final classes00.00%
Methods248
▷ Static methods31.21%
▷ Public methods21988.31%
▷ Protected methods2610.48%
▷ Private methods31.21%
Functions39
▷ Named functions3897.44%
▷ Anonymous functions12.56%
Constants19
▷ Global constants526.32%
▷ Class constants1473.68%
▷ Public constants14100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
15 PNG files occupy 0.30MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/contact.png1.19KB0.35KB▼ 70.35%
assets/images/directry.png1.28KB0.49KB▼ 61.48%
assets/images/logo.png6.79KB4.27KB▼ 37.09%
assets/images/check-ryt.png1.81KB0.73KB▼ 59.90%
vendor/itbz/fpdf/tutorial/logo.png2.32KB2.26KB▼ 2.57%