89% smart-delivery-shippings-and-returns

Code Review | Smart Delivery - Shippings and Returns

WordPress plugin Smart Delivery - Shippings and Returns scored89%from 54 tests.

About plugin

  • Plugin page: smart-delivery-sh...
  • Plugin version: 1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 6.3.1
  • First release: Jan 29, 2021
  • Latest release: Oct 22, 2021
  • Number of updates: 27
  • Update frequency: every 9.9 days
  • Top authors: sajjad650 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /555 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼4.36ms] Passed 4 tests

Server-side resources used by Smart Delivery - Shippings and Returns
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1139.23 ▼3.22
Dashboard /wp-admin3.41 ▲0.1043.74 ▼3.41
Posts /wp-admin/edit.php3.52 ▲0.1648.78 ▼2.78
Add New Post /wp-admin/post-new.php5.99 ▲0.1084.39 ▼8.03
Media Library /wp-admin/upload.php3.33 ▲0.1039.79 ▲7.40

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 6 new files
Database: 1 new table, 6 new options
New tables
wp_smartdelivery_setting
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Smart Delivery - Shippings and Returns
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6613.25 ▼1.174.60 ▲2.9440.47 ▼5.82
Dashboard /wp-admin2,218 ▲335.83 ▼0.06104.13 ▼13.6938.78 ▼4.39
Posts /wp-admin/edit.php2,098 ▲92.02 ▲0.0136.67 ▼1.4332.98 ▼0.79
Add New Post /wp-admin/post-new.php1,543 ▲2423.21 ▲0.05659.91 ▼15.6267.07 ▼0.14
Media Library /wp-admin/upload.php1,400 ▲154.22 ▼0.00109.74 ▲6.2147.28 ▲2.43

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% 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: curl, woocommerce order post, api, woocommerce

smart-delivery-shippings-and-returns/smartdelivery.php 85% from 13 tests

The primary PHP file in "Smart Delivery - Shippings and Returns" version 1.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 216 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("smart-delivery-shippings-and-returns.php" instead of "smartdelivery.php")

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
Success! There were no dangerous files found in this plugin749 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP31523748
CSS1061

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.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%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions2295.65%
▷ Anonymous functions14.35%
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 images were found in this plugin