84% welcart-exclude-from-delivery-day

Code Review | Welcart exclude from delivery day

WordPress plugin Welcart exclude from delivery day scored84%from 54 tests.

About plugin

  • Plugin page: welcart-exclude-f...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.2
  • WordPress version: 6.3.1
  • First release: Dec 28, 2022
  • Latest release: Apr 18, 2023
  • Number of updates: 4
  • Update frequency: every 27.7 days
  • Top authors: mochimochihesoo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /133 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼12.50ms] Passed 4 tests

Server-side resources used by Welcart exclude from delivery day
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0241.96 ▲3.41
Dashboard /wp-admin3.33 ▼0.0245.55 ▼14.07
Posts /wp-admin/edit.php3.38 ▲0.0249.37 ▼4.83
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.35 ▼34.35
Media Library /wp-admin/upload.php3.25 ▲0.0237.89 ▲3.25

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Welcart exclude from delivery day
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7214.74 ▲0.181.83 ▲0.1544.37 ▲7.10
Dashboard /wp-admin2,227 ▲384.85 ▼0.07110.88 ▲5.8243.50 ▼1.69
Posts /wp-admin/edit.php2,107 ▲181.99 ▼0.0539.59 ▼3.1741.04 ▲4.90
Add New Post /wp-admin/post-new.php1,543 ▲2323.07 ▼0.07654.87 ▲57.2155.39 ▼3.06
Media Library /wp-admin/upload.php1,397 ▲94.21 ▲0.0295.75 ▼1.8644.74 ▲2.48

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/welcart-exclude-from-delivery-day/class.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_url() in wp-content/plugins/welcart-exclude-from-delivery-day/include/my_custom_page.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/welcart-exclude-from-delivery-day/welcart-exclude-from-delivery-day.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: ec, welcart

welcart-exclude-from-delivery-day/welcart-exclude-from-delivery-day.php Passed 13 tests

The entry point to "Welcart exclude from delivery day" version 1.0.0 is a PHP file that has certain tags in its header comment area
112 characters long description:
welcartの配送希望日から指定の日付けを除外することが可能になるプラグインです。

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin120 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3219104
Sass11015
CSS1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.00%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
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