83% israeli-orange-delivery

Code Review | Israeli Orange Delivery

WordPress plugin Israeli Orange Delivery scored83%from 54 tests.

About plugin

  • Plugin page: israeli-orange-de...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0
  • WordPress version: 6.3.1
  • First release: May 27, 2022
  • Latest release: May 30, 2022
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: gamlielsolutions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /237 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.17MB] [CPU: ▼13.10ms] Passed 4 tests

An overview of server-side resources used by Israeli Orange Delivery
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.72 ▼9.49
Dashboard /wp-admin3.56 ▲0.2248.93 ▼14.31
Posts /wp-admin/edit.php3.61 ▲0.2648.25 ▼3.78
Add New Post /wp-admin/post-new.php6.08 ▲0.1984.22 ▼24.80
Media Library /wp-admin/upload.php3.48 ▲0.2537.27 ▲0.02

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 41 new files
Database: no new tables, 14 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
wc_iod_seller_company_postcode
widget_recent-posts
wc_iod_api_customer_code
wc_iod_seller_company_name
can_compress_scripts
wc_iod_api_password
wc_iod_seller_company_address_2
wc_iod_api_username
...

Browser metrics Passed 4 tests

An overview of browser requirements for Israeli Orange Delivery
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▼0.011.83 ▼0.1042.84 ▲0.75
Dashboard /wp-admin2,203 ▲114.84 ▼0.07111.44 ▲2.3742.66 ▼1.19
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0735.95 ▼4.0834.87 ▼1.76
Add New Post /wp-admin/post-new.php1,514 ▼1417.57 ▼1.08695.94 ▲67.0552.76 ▼3.72
Media Library /wp-admin/upload.php1,385 ▼64.14 ▼0.0895.51 ▼3.7444.18 ▼0.19

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 14 options in the database
    • wc_iod_api_customer_code
    • can_compress_scripts
    • wc_iod_seller_company_address_1
    • widget_theysaidso_widget
    • db_upgraded
    • wc_iod_seller_company_name
    • widget_recent-posts
    • theysaidso_admin_options
    • wc_iod_api_password
    • wc_iod_seller_company_address_2
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'WC_IOD_PLUGIN_PATHincludes/libraries/TCPDF/tcpdf.php' (include_path='.:/usr/share/php') in wp-content/plugins/israeli-orange-delivery/includes/admin/class-wc-iod-admin-print-label.php on line 9
    • > PHP Warning
      require_once(WC_IOD_PLUGIN_PATHincludes/libraries/TCPDF/tcpdf.php): failed to open stream: No such file or directory in wp-content/plugins/israeli-orange-delivery/includes/admin/class-wc-iod-admin-print-label.php on line 9
    • > PHP Warning
      Use of undefined constant WC_IOD_PLUGIN_PATH - assumed 'WC_IOD_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/israeli-orange-delivery/includes/admin/class-wc-iod-admin-print-label.php on line 9

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)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: shipping, woocommerce, label, ecommerce, delivery...

israeli-orange-delivery/init.php 85% from 13 tests

The main file in "Israeli Orange Delivery" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • 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: It is recommended to name the main PHP file as the plugin slug ("israeli-orange-delivery.php" instead of "init.php")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin46,526 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP291,56411,67446,526

PHP code 0% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Please fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 4,349)
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 499)
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity307.67
▷ Minimum class complexity1.00
▷ Maximum class complexity4,349.00
Average method complexity9.87
▷ Minimum method complexity1.00
▷ Maximum method complexity499.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes14.76%
Methods727
▷ Static methods11115.27%
▷ Public methods45061.90%
▷ Protected methods27637.96%
▷ Private methods10.14%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
Constants86
▷ Global constants86100.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