78% salesbeat-for-woocommerce

Code Review | Salesbeat - Один модуль для всех служб доставки

WordPress plugin Salesbeat - Один модуль для всех служб доставки scored78%from 54 tests.

About plugin

  • Plugin page: salesbeat-for-woo...
  • Plugin version: 1.1.9
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.7
  • WordPress version: 6.3.1
  • First release: Nov 10, 2020
  • Latest release: Apr 5, 2021
  • Number of updates: 17
  • Update frequency: every 8.6 days
  • Top authors: salesbeat (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /689 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.97ms] Passed 4 tests

This is a short check of server-side resources used by Salesbeat - Один модуль для всех служб доставки
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.35 ▼0.67
Dashboard /wp-admin3.31 ▲0.0043.74 ▼3.05
Posts /wp-admin/edit.php3.36 ▲0.0047.54 ▼1.60
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.07 ▼20.07
Media Library /wp-admin/upload.php3.23 ▲0.0035.35 ▼3.17

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Salesbeat - Один модуль для всех служб доставки: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.421.86 ▼0.0142.82 ▼1.41
Dashboard /wp-admin2,203 ▲125.90 ▲0.88106.81 ▲6.5441.82 ▼2.72
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0140.41 ▼0.0235.82 ▼1.44
Add New Post /wp-admin/post-new.php1,535 ▲1622.97 ▼0.41599.08 ▼40.0670.61 ▲15.23
Media Library /wp-admin/upload.php1,388 ▼34.21 ▼0.0296.25 ▼4.3844.20 ▼2.10

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

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 | 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
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/salesbeat-for-woocommerce/includes/views/wcOrder.php
    • > /wp-content/plugins/salesbeat-for-woocommerce/includes/views/product.php
  • 20× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to get property 'id' of non-object in wp-content/plugins/salesbeat-for-woocommerce/includes/views/shipping.php on line 28
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/salesbeat-for-woocommerce/includes/views/product.php on line 10
    • > PHP Notice
      Undefined variable: arDeliveryInfo in wp-content/plugins/salesbeat-for-woocommerce/includes/views/wcOrder.php on line 9
    • > PHP Notice
      Undefined variable: params in wp-content/plugins/salesbeat-for-woocommerce/includes/views/product.php on line 11
    • > PHP Notice
      Undefined variable: method in wp-content/plugins/salesbeat-for-woocommerce/includes/views/shipping.php on line 28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/salesbeat-for-woocommerce/includes/views/productTabDelivery.php:4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/salesbeat-for-woocommerce/includes/views/product.php on line 9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/salesbeat-for-woocommerce/includes/views/product.php on line 11
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/salesbeat-for-woocommerce/includes/views/product.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/salesbeat-for-woocommerce/includes/views/product.php on line 12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: salesbeat, all-russian-delivery, woocommerce, delivery

salesbeat-for-woocommerce/salesbeat.php 77% from 13 tests

The main PHP file in "Salesbeat - Один модуль для всех служб доставки" ver. 1.1.9 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Plugin Name: A shorter plugin name is better (currently 77 characters long instead of max. 70)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("salesbeat-for-woocommerce.php" instead of "salesbeat.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 190 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin1,859 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP203443121,500
JavaScript5400291
CSS48055
SQL20013

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity14.92
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity3.15
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods84
▷ Static methods1720.24%
▷ Public methods7488.10%
▷ Protected methods00.00%
▷ Private methods1011.90%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin