62% computer-repair-shop

Code Review | CRM WordPress Plugin - RepairBuddy

WordPress plugin CRM WordPress Plugin - RepairBuddy scored62%from 54 tests.

About plugin

  • Plugin page: computer-repair-shop
  • Plugin version: 3.7980
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Feb 26, 2016
  • Latest release: Nov 30, 2023
  • Number of updates: 82
  • Update frequency: every 34.6 days
  • Top authors: sweetdaisy86 (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

400+ active /14,048 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲3.61MB] [CPU: ▲20.29ms] Passed 4 tests

A check of server-side resources used by CRM WordPress Plugin - RepairBuddy
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /7.06 ▲3.5968.52 ▲23.94
Dashboard /wp-admin6.97 ▲3.6677.16 ▲25.64
Posts /wp-admin/edit.php7.03 ▲3.6670.46 ▲15.35
Add New Post /wp-admin/post-new.php9.50 ▲3.61118.38 ▲16.22
Media Library /wp-admin/upload.php6.82 ▲3.5962.97 ▲29.26
Customer Devices /wp-admin/admin.php?page=wcrb_customer_devices6.7759.65
Jobs /wp-admin/edit.php?post_type=rep_jobs6.9466.51
Devices /wp-admin/edit.php?post_type=rep_devices6.8761.97
Reminder Logs /wp-admin/admin.php?page=wcrb_reminder_logs6.7955.43
Computer Repair /wp-admin/admin.php?page=wc-computer-rep-shop-handle6.9194.99
Parts /wp-admin/edit.php?post_type=rep_products6.8761.85
Device Types /wp-admin/edit-tags.php?taxonomy=device_type&post_type=rep_devices6.8563.85
Clients /wp-admin/admin.php?page=wc-computer-rep-shop-clients6.8262.74
Services /wp-admin/edit.php?post_type=rep_services6.8758.95
Print Screen /wp-admin/edit.php?post_type=rep_jobs&page=wc_computer_repair_print6.6648.06

Server storage [IO: ▲2.36MB] [DB: ▲0.02MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 111 new files
Database: 10 new tables, 17 new options
New tables
wp_wc_cr_reminder_logs
wp_wc_cr_customer_devices
wp_wc_cr_taxes
wp_wc_cr_payment_status
wp_wc_cr_job_history
wp_wc_cr_maint_reminders
wp_wc_cr_order_items
wp_wc_cr_job_status
wp_wc_cr_payments
wp_wc_cr_order_itemmeta
New WordPress options
wc_rb_device_booking_page_id
widget_recent-posts
wc_rb_status_check_page_id
wc_rb_list_services_page_id
wc_rb_list_parts_page_id
offer_pic_de
widget_theysaidso_widget
wc_rb_customer_login_page
update_tax_states
wc_cr_shop_version
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for CRM WordPress Plugin - RepairBuddy
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,972 ▲21013.82 ▼0.9110.40 ▲8.6346.10 ▲0.12
Dashboard /wp-admin2,246 ▲665.59 ▼0.0597.67 ▲3.9982.98 ▲38.67
Posts /wp-admin/edit.php2,169 ▲661.96 ▼0.0239.53 ▼5.5234.65 ▼5.76
Add New Post /wp-admin/post-new.php1,592 ▲6621.98 ▼1.10796.06 ▲155.3568.38 ▲9.91
Media Library /wp-admin/upload.php1,469 ▲724.14 ▼0.1195.08 ▼3.7168.18 ▲26.23
Customer Devices /wp-admin/admin.php?page=wcrb_customer_devices9081.9926.0226.92
Jobs /wp-admin/edit.php?post_type=rep_jobs1,3902.7871.8130.57
Devices /wp-admin/edit.php?post_type=rep_devices1,1461.9033.9429.35
Reminder Logs /wp-admin/admin.php?page=wcrb_reminder_logs9231.9925.3027.33
Computer Repair /wp-admin/admin.php?page=wc-computer-rep-shop-handle6,0776.00175.7937.73
Parts /wp-admin/edit.php?post_type=rep_products1,1371.9636.6030.58
Device Types /wp-admin/edit-tags.php?taxonomy=device_type&post_type=rep_devices1,5313.1544.7767.22
Clients /wp-admin/admin.php?page=wc-computer-rep-shop-clients2,1222.4547.6929.49
Services /wp-admin/edit.php?post_type=rep_services1,1371.9035.8632.90
Print Screen /wp-admin/edit.php?post_type=rep_jobs&page=wc_computer_repair_print280.410.084.22

Uninstaller [IO: ▲0.00MB] [DB: ▲0.02MB] 50% 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 10 tables in the database
    • wp_wc_cr_order_itemmeta
    • wp_wc_cr_taxes
    • wp_wc_cr_payments
    • wp_wc_cr_reminder_logs
    • wp_wc_cr_order_items
    • wp_wc_cr_customer_devices
    • wp_wc_cr_payment_status
    • wp_wc_cr_job_history
    • wp_wc_cr_job_status
    • wp_wc_cr_maint_reminders
  • Zombie WordPress options detected upon uninstall: 17 options
    • wc_rb_setup_pages_once
    • wc_rb_payment_methods_active
    • widget_recent-posts
    • widget_recent-comments
    • wc_cr_shop_version
    • db_upgraded
    • theysaidso_admin_options
    • wc_rb_status_check_page_id
    • wc_rb_customer_login_page
    • wc_rb_list_services_page_id
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=wcrb_customer_devices
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

SRP 50% 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
  • 16× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/computer-repair-shop/admin_menu.php:59
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/computer-repair-shop/lib/shortcodes/start_job_by_device.php:172
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/computer-repair-shop/lib/includes/wc_services.php:40
    • > PHP Warning
      Use of undefined constant WC_COMPUTER_REPAIR_SHOP_DIR - assumed 'WC_COMPUTER_REPAIR_SHOP_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/computer-repair-shop/lib/shortcodes/shortcodes.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/computer-repair-shop/lib/shortcodes/order_status.php:35
    • > PHP Warning
      Use of undefined constant DS - assumed 'DS' (this will throw an Error in a future version of PHP) in wp-content/plugins/computer-repair-shop/lib/shortcodes/shortcodes.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/computer-repair-shop/lib/includes/wc_products.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/computer-repair-shop/lib/includes/wc_devices.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/computer-repair-shop/lib/includes/theme_functions.php:125
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/computer-repair-shop/lib/shortcodes/list_products.php:38

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/edit.php?post_type=rep_jobs&page=wc_computer_repair_print
    • > Network (severe)
    wp-admin/edit.php?post_type=rep_jobs&page=wc_computer_repair_print - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Too many tags (23 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

computer-repair-shop/computer_repair_shop.php 77% from 13 tests

The primary PHP file in "CRM WordPress Plugin - RepairBuddy" version 3.7980 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages")
  • Main file name: Name the main plugin file the same as the plugin slug ("computer-repair-shop.php" instead of "computer_repair_shop.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected35,025 lines of code in 80 files:
LanguageFilesBlank linesComment linesLines of code
PHP624,0341,42717,535
CSS71,638359,202
PO File43,0534,2656,495
JavaScript73911071,793

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity52.18
▷ Minimum class complexity5.00
▷ Maximum class complexity194.00
Average method complexity7.59
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods132
▷ Static methods00.00%
▷ Public methods132100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions208
▷ Named functions20297.12%
▷ Anonymous functions62.88%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
14 PNG files occupy 0.24MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/images/icons/parts.png26.76KB10.21KB▼ 61.85%
assets/images/nav-icon.png0.14KB0.11KB▼ 23.40%
assets/admin/images/icons/technicians.png19.25KB8.13KB▼ 57.79%
assets/admin/images/icons/clients.png55.05KB10.45KB▼ 81.01%
assets/admin/images/icons/types.png17.41KB5.29KB▼ 69.61%