48% pidex

Code Review | Pidex

WordPress plugin Pidex scored48%from 54 tests.

About plugin

  • Plugin page: pidex
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.2.2
  • WordPress version: 6.3.1
  • First release: Mar 11, 2023
  • Latest release: Aug 7, 2023
  • Number of updates: 11
  • Update frequency: every 13.6 days
  • Top authors: pidexinfosys (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /176 total downloads

Benchmarks

Plugin footprint 30% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.24MB] [CPU: ▼11.00ms] Passed 4 tests

Analyzing server-side resources used by Pidex
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2340.82 ▲0.66
Dashboard /wp-admin3.55 ▲0.2146.55 ▼13.39
Posts /wp-admin/edit.php3.67 ▲0.3148.76 ▼6.45
Add New Post /wp-admin/post-new.php6.15 ▲0.2683.43 ▼24.83
Media Library /wp-admin/upload.php3.48 ▲0.2536.42 ▲3.95
Pidex /wp-admin/admin.php?page=pidex3.4633.74
Pidex Settings /wp-admin/admin.php?page=pidex_settings3.4534.11
Pidex Tracking /wp-admin/admin.php?page=pidex_tracking3.4532.88

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 55 new files
Database: 1 new table, 9 new options
New tables
wp_pidex_shipped_orders
New WordPress options
pidex_installed
db_upgraded
theysaidso_admin_options
pidex_settings
pidex_version
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Pidex
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,857 ▲9614.37 ▲0.021.74 ▲0.1233.94 ▼7.59
Dashboard /wp-admin2,266 ▲925.65 ▲0.0792.95 ▲7.1342.65 ▲1.64
Posts /wp-admin/edit.php2,169 ▲692.05 ▲0.0336.77 ▼2.6335.55 ▼0.02
Add New Post /wp-admin/post-new.php1,552 ▲2423.11 ▼0.16680.00 ▲3.6253.89 ▼4.48
Media Library /wp-admin/upload.php1,471 ▲714.23 ▲0.0694.79 ▼0.3044.13 ▲2.98
Pidex /wp-admin/admin.php?page=pidex1,1901.6831.0671.25
Pidex Settings /wp-admin/admin.php?page=pidex_settings1,1532.2326.2453.01
Pidex Tracking /wp-admin/admin.php?page=pidex_tracking9792.0727.7238.89

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Error in wp-content/plugins/pidex/uninstall.php+18
    Uncaught Error: Call to undefined function wc_get_orders() in wp-content/plugins/pidex/uninstall.php:18
    Stack trace:
    #0 wp-admin/includes/plugin.php(1245): include_once()
    #1 wp-admin/includes/plugin.php(960): uninstall_plugin()
  • The plugin did not uninstall correctly, leaving 55 files (3.49MB) in the plugin directory
    • (new file) Pidex.php
    • (new file) assets/css/pidex-woocommerce-order-status-style.css
    • (new file) assets/css/pidex-admin-style.css
    • (new file) assets/image/1Dashboard.png
    • (new file) assets/image/3PidexSettings.png
    • (new file) assets/css/pidex-tracking-style.css
    • (new file) assets/css/toastify.min.css
    • (new file) assets/css/pidex-admin-menu-style.css
    • (new file) assets/image/2APIToken.png
    • (new file) assets/css/select2.min.css
    • ...
  • Zombie tables detected upon uninstall: 1 table
    • wp_pidex_shipped_orders
  • Zombie WordPress options were found after uninstall: 10 options
    • db_upgraded
    • recovery_mode_email_last_sent
    • widget_theysaidso_widget
    • pidex_installed
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • pidex_version
    • theysaidso_admin_options
    • pidex_settings

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/pidex/includes/Frontend/index.php
    • > /wp-content/plugins/pidex/index.php
    • > /wp-content/plugins/pidex/includes/Frontend/views/pidex-tracking-view.php
    • > /wp-content/plugins/pidex/includes/index.php
    • > /wp-content/plugins/pidex/includes/Admin/index.php
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_html_class() in wp-content/plugins/pidex/includes/Admin/views/pidex-place-order-metabox-view.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/pidex/includes/Admin/views/pidex-settings-view.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/pidex/includes/Admin/views/pidex-welcome-view.php:22
    • > PHP Notice
      Undefined variable: apiCredentialStatus in wp-content/plugins/pidex/includes/Admin/views/pidex-place-order-metabox-view.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/pidex/includes/Constants.php:6
    • > PHP Notice
      Undefined variable: apiCredentialStatus in wp-content/plugins/pidex/includes/Admin/views/pidex-place-order-metabox-view.php on line 10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: pidex-parcel-tracker, delivery, courier, pidex, pidex-parcel-booking...

pidex/Pidex.php 85% from 13 tests

The primary PHP file in "Pidex" version 1.0.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Domain Path: The domain path folder was not found ("/languages")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("pidex.php" instead of "Pidex.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
Good job! No executable or dangerous file extensions detected2,613 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP203627191,501
JavaScript6161167588
SVG101518
CSS60146

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity9.33
▷ Minimum class complexity1.00
▷ Maximum class complexity58.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes18.33%
Methods47
▷ Static methods12.13%
▷ Public methods4697.87%
▷ Protected methods00.00%
▷ Private methods12.13%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 1.91MB with 1.43MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/image/3PidexSettings.png71.07KB15.52KB▼ 78.17%
assets/image/2APIToken.png166.40KB49.34KB▼ 70.35%
assets/image/1Dashboard.png652.71KB157.08KB▼ 75.93%
assets/image/7PidexTackingResult.png321.46KB77.96KB▼ 75.75%
assets/image/4WooCommerceOrders.png113.73KB29.40KB▼ 74.15%