78% postage-tracking-code-sms

Code Review | پیامک پستی سفارشات ووکامرس

WordPress plugin پیامک پستی سفارشات ووکامرس scored 78% from 54 tests.

About plugin

  • Plugin page: postage-tracking-...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8
  • WordPress version: 6.3.1
  • First release: Aug 4, 2021
  • Latest release: Aug 13, 2021
  • Number of updates: 4
  • Update frequency: every 2.5 days
  • Top authors: mohammadmalekirad (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 819 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
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.76ms] Passed 4 tests

An overview of server-side resources used by پیامک پستی سفارشات ووکامرس
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0536.91 ▲0.21
Dashboard /wp-admin3.36 ▲0.0547.34 ▼2.56
Posts /wp-admin/edit.php3.47 ▲0.1148.16 ▲0.27
Add New Post /wp-admin/post-new.php5.94 ▲0.0586.19 ▼8.53
Media Library /wp-admin/upload.php3.28 ▲0.0536.04 ▼0.14

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for پیامک پستی سفارشات ووکامرس
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.20 ▼1.035.37 ▲3.6642.59 ▼5.04
Dashboard /wp-admin2,206 ▲184.84 ▼0.06117.43 ▲6.7343.72 ▼1.06
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0340.74 ▼0.8436.42 ▼1.07
Add New Post /wp-admin/post-new.php1,411 ▼12218.23 ▼4.84585.75 ▼45.9148.11 ▼5.67
Media Library /wp-admin/upload.php1,388 ▼34.14 ▼0.1298.41 ▼5.2742.09 ▼3.78

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 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
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/postage-tracking-code-sms/views/metabox.php
    • > /wp-content/plugins/postage-tracking-code-sms/views/option-panel.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/postage-tracking-code-sms/views/settings.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PostageTrackingCodeSms\\classes\\ViMetaBoxes' not found in wp-content/plugins/postage-tracking-code-sms/classes/SmsMetaBox.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PostageTrackingCodeSms\\classes\\ViSingleton' not found in wp-content/plugins/postage-tracking-code-sms/classes/OptionPanel.php:5
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/postage-tracking-code-sms/views/metabox.php on line 2
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/postage-tracking-code-sms/views/metabox.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'PostageTrackingCodeSms\\classes\\ViSingleton' not found in wp-content/plugins/postage-tracking-code-sms/classes/ViMetaBoxes.php:5

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: post, order, woocommerce, sms

postage-tracking-code-sms/PostageTrackingCodeSms.php 92% from 13 tests

"پیامک پستی سفارشات ووکامرس" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("postage-tracking-code-sms.php" instead of "PostageTrackingCodeSms.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin1,046 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP19210299904
JavaScript2198121
SVG10015
JSON1005
CSS1061

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity13.00
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes9
▷ Abstract classes222.22%
▷ Concrete classes777.78%
▷ Final classes00.00%
Methods67
▷ Static methods2334.33%
▷ Public methods6089.55%
▷ Protected methods00.00%
▷ Private methods710.45%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants7
▷ Global constants457.14%
▷ Class constants342.86%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png26.19KB10.85KB▼ 58.59%
images/ic.png1.87KB0.32KB▼ 82.99%