84% smspilot-ru-woocommerce

Code Review | SMSPILOT.RU WooCommerce

WordPress plugin SMSPILOT.RU WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: smspilot-ru-wooco...
  • Plugin version: 1.46
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.2
  • WordPress version: 6.3.1
  • First release: May 6, 2017
  • Latest release: Apr 6, 2023
  • Number of updates: 35
  • Update frequency: every 61.7 days
  • Top authors: shuchkin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,176 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: ▲0.07MB] [CPU: ▼3.85ms] Passed 4 tests

An overview of server-side resources used by SMSPILOT.RU WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.22 ▲2.10
Dashboard /wp-admin3.37 ▲0.0746.34 ▼1.29
Posts /wp-admin/edit.php3.43 ▲0.0744.82 ▼5.03
Add New Post /wp-admin/post-new.php5.96 ▲0.0779.38 ▼11.19
Media Library /wp-admin/upload.php3.30 ▲0.0737.63 ▲3.40

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for SMSPILOT.RU WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.24 ▼0.481.58 ▼0.4240.66 ▼3.36
Dashboard /wp-admin2,198 ▲215.63 ▼0.0783.74 ▼4.9536.88 ▼4.65
Posts /wp-admin/edit.php2,079 ▼32.01 ▲0.0137.60 ▼5.6033.29 ▼5.93
Add New Post /wp-admin/post-new.php1,526 ▼823.28 ▲5.04601.60 ▼21.7466.32 ▼1.17
Media Library /wp-admin/upload.php1,400 ▼04.21 ▲0.0198.55 ▼1.7641.67 ▼4.88

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/smspilot-ru-woocommerce/smspilot_woocommerce.php on line 11
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/smspilot-ru-woocommerce/smspilot_woocommerce.php on line 11
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/smspilot-ru-woocommerce/smspilot_woocommerce.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: woocommerce, sms, ecommerce, sms notification, woo commerce

smspilot-ru-woocommerce/smspilot_woocommerce.php 92% from 13 tests

The main PHP script in "SMSPILOT.RU WooCommerce" version 1.46 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("smspilot-ru-woocommerce.php" instead of "smspilot_woocommerce.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 detected325 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13729325

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity45.00
▷ Minimum class complexity45.00
▷ Maximum class complexity45.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods327.27%
▷ Public methods763.64%
▷ Protected methods00.00%
▷ Private methods436.36%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected