72% wayra-free-shipping-on-product-details

Code Review | Wayra - Free shipping on product details

WordPress plugin Wayra - Free shipping on product details scored72%from 54 tests.

About plugin

  • Plugin page: wayra-free-shippi...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 15, 2020
  • Latest release: Jan 23, 2022
  • Number of updates: 5
  • Update frequency: every 92.8 days
  • Top authors: wayradigital (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /625 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.95ms] Passed 4 tests

An overview of server-side resources used by Wayra - Free shipping on product details
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.13 ▼3.87
Dashboard /wp-admin3.32 ▲0.0246.69 ▼0.72
Posts /wp-admin/edit.php3.37 ▲0.0247.34 ▼3.94
Add New Post /wp-admin/post-new.php5.90 ▲0.0292.84 ▲12.62
Media Library /wp-admin/upload.php3.25 ▲0.0234.88 ▲0.72
Free shipping on product details /wp-admin/options-general.php?page=wayra-free-shipping-on-product-details3.3031.69

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 42 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Wayra - Free shipping on product details
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.27 ▼1.124.37 ▲2.6839.03 ▼4.75
Dashboard /wp-admin2,209 ▲214.83 ▼0.96104.98 ▲6.6740.03 ▲0.59
Posts /wp-admin/edit.php2,095 ▲32.06 ▲0.0741.33 ▲2.6936.06 ▲0.91
Add New Post /wp-admin/post-new.php1,535 ▲222.99 ▼0.31667.92 ▲40.9154.27 ▲5.52
Media Library /wp-admin/upload.php1,397 ▲94.17 ▼0.0499.68 ▲0.0843.82 ▲2.08
Free shipping on product details /wp-admin/options-general.php?page=wayra-free-shipping-on-product-details1,0212.1824.9745.96

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wayra-free-shipping-on-product-details
    • > Notice in wp-content/plugins/wayra-free-shipping-on-product-details/admin/partials/wayra-free-shipping-on-product-details-admin-display.php+38
    Trying to access array offset on value of type bool

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
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wayra-free-shipping-on-product-details/public/partials/wayra-free-shipping-on-product-details-public-display.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Undefined variable: text in wp-content/plugins/wayra-free-shipping-on-product-details/public/partials/wayra-free-shipping-on-product-details-public-display.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wayra-free-shipping-on-product-details/admin/partials/wayra-free-shipping-on-product-details-admin-display.php:16
    • > PHP Notice
      Undefined variable: show_icon in wp-content/plugins/wayra-free-shipping-on-product-details/public/partials/wayra-free-shipping-on-product-details-public-display.php on line 16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention: Please take inspiration from this readme.txt

wayra-free-shipping-on-product-details/wayra-free-shipping-on-product-details.php Passed 13 tests

The entry point to "Wayra - Free shipping on product details" version 1.0.1 is a PHP file that has certain tags in its header comment area
63 characters long description:
Show icon and shipping text on products based on product price.

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
No dangerous file extensions were detected1,633 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PO File114185061,210
PHP12173500341
CSS213082

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity4.29
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.82
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2278.57%
▷ Protected methods00.00%
▷ Private methods621.43%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin