68% aramex

Code Review | Aramex Plugin

WordPress plugin Aramex Plugin scored68%from 54 tests.

About plugin

  • Plugin page: aramex
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.0
  • WordPress version: 6.3.1
  • First release: Apr 6, 2022
  • Latest release: Jun 5, 2022
  • Number of updates: 12
  • Update frequency: every 5.4 days
  • Top authors: developerbbamastro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /965 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼6.77ms] Passed 4 tests

This is a short check of server-side resources used by Aramex Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0946.01 ▲5.52
Dashboard /wp-admin3.38 ▲0.0346.66 ▼12.24
Posts /wp-admin/edit.php3.49 ▲0.1446.15 ▼2.86
Add New Post /wp-admin/post-new.php5.98 ▲0.0982.82 ▼14.82
Media Library /wp-admin/upload.php3.30 ▲0.0734.11 ▲2.84

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Aramex Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.41 ▼0.791.70 ▲0.1246.45 ▲8.91
Dashboard /wp-admin2,208 ▲235.88 ▲0.9899.17 ▲0.1638.68 ▼2.28
Posts /wp-admin/edit.php2,091 ▲52.05 ▲0.0533.05 ▼7.2833.94 ▼3.78
Add New Post /wp-admin/post-new.php1,529 ▼422.17 ▼0.90674.33 ▲57.2763.56 ▲14.02
Media Library /wp-admin/upload.php1,390 ▲24.23 ▼0.1296.80 ▲0.2540.45 ▼1.90

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/aramex/aramex.php+38
    Non-static method Aramex_Deactivator::deactivate() should not be called statically
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/aramex/admin/partials/aramex-shop-order-custom-order-fields-partial.php
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/aramex/admin/partials/aramex-custom-order-fields-partial.php:1
    • > PHP Notice
      Undefined variable: order_fields in wp-content/plugins/aramex/admin/partials/aramex-shop-order-custom-order-fields-partial.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/aramex/includes/aramex-config.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/aramex/includes/class-aramex-shipping-rules.php:2
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/aramex/admin/partials/aramex-shop-order-custom-order-fields-partial.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

aramex/aramex.php Passed 13 tests

"Aramex Plugin" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
96 characters long description:
Multi Carrier Shipping and Logistics Technology able to seamlessly integrate into your Woo cart.

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
No dangerous file extensions were detected1,314 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP24240231,247
JavaScript29167

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity9.87
▷ Minimum class complexity1.00
▷ Maximum class complexity52.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods89
▷ Static methods88.99%
▷ Public methods7382.02%
▷ Protected methods00.00%
▷ Private methods1617.98%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin