83% aramex-optilog-woocommerce

Code Review | Aramex Optilog WooCommerce

WordPress plugin Aramex Optilog WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: aramex-optilog-wo...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-5.0
  • WordPress version: 6.3.1
  • First release: Sep 10, 2018
  • Latest release: Dec 23, 2019
  • Number of updates: 7
  • Update frequency: every 68.3 days
  • Top authors: aramex (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,505 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Aramex Optilog WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.57 ▼0.05
Dashboard /wp-admin3.31 ▼0.0449.86 ▼9.27
Posts /wp-admin/edit.php3.36 ▲0.0042.52 ▼3.81
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.54 ▼12.00
Media Library /wp-admin/upload.php3.23 ▲0.0032.79 ▼5.02

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

A short overview of filesystem and database impact
Please fix the following
  • Illegal file modification found: 1 file (0.00KB) outside of "wp-content/plugins/aramex-optilog-woocommerce/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/aramex-optilog-woocommerce/assets/icon-256\303\227256.png"
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Aramex Optilog WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.041.81 ▲0.0345.27 ▲0.92
Dashboard /wp-admin2,203 ▲145.83 ▲0.9197.35 ▼10.4436.98 ▼6.54
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.0133.88 ▼4.6034.61 ▲2.26
Add New Post /wp-admin/post-new.php1,533 ▼123.21 ▲0.02664.47 ▼19.3456.18 ▼9.42
Media Library /wp-admin/upload.php1,388 ▲34.18 ▼0.0394.56 ▼7.7740.24 ▲1.15

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/aramex-optilog-woocommerce/includes/shipping/data-aramex-optilog-settings.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/aramex-optilog-woocommerce/includes/shipping/class-aramex-optilog-woocommerce-shipping.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/aramex-optilog-woocommerce/templates/adminhtml/paid.php:39

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Donate link: Invalid URI ("aramex.com")
  • Tags: Please reduce the number of tags, currently 19 tag instead of maximum 10
The official readme.txt might help

aramex-optilog-woocommerce/aramex-optilog.php 85% from 13 tests

The primary PHP file in "Aramex Optilog WooCommerce" version 1.0.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("aramex-optilog-woocommerce.php" instead of "aramex-optilog.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected1,561 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP101194151,141
XML100386
CSS12434

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity23.17
▷ Minimum class complexity3.00
▷ Maximum class complexity101.00
Average method complexity6.54
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods24
▷ Static methods312.50%
▷ Public methods1041.67%
▷ Protected methods520.83%
▷ Private methods937.50%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 1.67MB with 1.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png143.77KB59.01KB▼ 58.95%
assets/screenshot-2.png102.53KB39.66KB▼ 61.32%
assets/banner-1544x500.png1,363.10KB476.46KB▼ 65.05%
assets/screenshot-1.png72.76KB25.37KB▼ 65.13%
assets/icon-256×256.png23.65KB4.13KB▼ 82.55%