78% phone-orders-for-woocommerce

Code Review | Phone Orders for WooCommerce

WordPress plugin Phone Orders for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: phone-orders-for-...
  • Plugin version: 3.8.7
  • PHP compatiblity: 5.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.3
  • WordPress version: 6.3.1
  • First release: Jun 14, 2017
  • Latest release: Sep 25, 2023
  • Number of updates: 174
  • Update frequency: every 13.3 days
  • Top authors: algol.plus (100%)

Code review

54 tests

User reviews

31 reviews

Install metrics

1,000+ active /61,615 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲1.16MB] [CPU: ▼1.02ms] Passed 4 tests

Analyzing server-side resources used by Phone Orders for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.5843.02 ▲4.25
Dashboard /wp-admin4.72 ▲1.3754.84 ▼5.10
Posts /wp-admin/edit.php4.77 ▲1.4150.36 ▲1.89
Add New Post /wp-admin/post-new.php7.24 ▲1.3590.57 ▼5.10
Media Library /wp-admin/upload.php4.58 ▲1.3449.07 ▲14.68
Phone Orders /wp-admin/admin.php?page=phone-orders-for-woocommerce4.4634.09

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 103 new files
Database: 1 new table, 9 new options
New tables
wp_phone_orders_log
New WordPress options
recovery_mode_email_last_sent
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
phone-orders-for-woocommerce-activation-notice-shown
phone-orders-for-woocommerce-version
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Phone Orders for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6014.38 ▲0.031.59 ▲0.0735.17 ▼3.95
Dashboard /wp-admin2,195 ▲155.61 ▼0.0382.82 ▼2.4139.09 ▲0.37
Posts /wp-admin/edit.php2,100 ▼01.98 ▲0.0137.16 ▼6.6130.89 ▼6.72
Add New Post /wp-admin/post-new.php1,536 ▲818.10 ▼4.92611.44 ▼81.2174.56 ▲21.12
Media Library /wp-admin/upload.php1,400 ▼04.26 ▲0.0594.29 ▼5.4839.71 ▼4.46
Phone Orders /wp-admin/admin.php?page=phone-orders-for-woocommerce550.420.1110.01

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 8 options
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • recovery_mode_email_last_sent
    • widget_recent-comments
    • phone-orders-for-woocommerce-version

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=phone-orders-for-woocommerce
    • > Error in wp-content/plugins/phone-orders-for-woocommerce/classes/class-wc-phone-orders-main.php+119
    Uncaught Error: Call to undefined function wc_get_cart_url() in wp-content/plugins/phone-orders-for-woocommerce/classes/class-wc-phone-orders-main.php:119
    Stack trace:
    #0 wp-content/plugins/phone-orders-for-woocommerce/classes/class-wc-phone-orders-main.php(29): WC_Phone_Orders_Main::load_scripts()
    #1 wp-includes/class-wp-hook.php(310): WC_Phone_Orders_Main->{closure}()
    #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-header.php(118): do_action()
    #5 wp-admin/admin.php(239): require_once('/var/www/wordpr...')
    #6 {main}
    thrown

SRP Passed 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
The SRP test was a success

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=phone-orders-for-woocommerce
    • > Network (severe)
    wp-admin/admin.php?page=phone-orders-for-woocommerce - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: call center, manual, woocommerce, backend, manual orders...

phone-orders-for-woocommerce/phone-orders-for-woocommerce.php 92% from 13 tests

The primary PHP file in "Phone Orders for WooCommerce" version 3.8.7 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.8" instead of "3.3")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected35,974 lines of code in 94 files:
LanguageFilesBlank linesComment linesLines of code
Vuejs Component451,2477412,359
JSON20010,014
PHP271,5807016,688
PO File61,7822,2854,161
JavaScript9214361,546
CSS5199581,206

PHP code Passed 2 tests

A short review 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.49
Average class complexity47.00
▷ Minimum class complexity1.00
▷ Maximum class complexity368.00
Average method complexity3.58
▷ Minimum method complexity1.00
▷ Maximum method complexity59.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes24
▷ Abstract classes14.17%
▷ Concrete classes2395.83%
▷ Final classes00.00%
Methods300
▷ Static methods4414.67%
▷ Public methods17558.33%
▷ Protected methods9732.33%
▷ Private methods289.33%
Functions59
▷ Named functions00.00%
▷ Anonymous functions59100.00%
Constants14
▷ Global constants857.14%
▷ Class constants642.86%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin