77% elex-hide-woocommerce-shipping-methods-basic

Code Review | ELEX Hide WooCommerce Shipping Methods

WordPress plugin ELEX Hide WooCommerce Shipping Methods scored77%from 54 tests.

About plugin

  • Plugin page: elex-hide-woocomm...
  • Plugin version: 1.3.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-6.3
  • WordPress version: 6.3.1
  • First release: Jun 7, 2019
  • Latest release: Aug 11, 2023
  • Number of updates: 43
  • Update frequency: every 35.5 days
  • Top authors: elextensions (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /32,790 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 gracefully, with no errors

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

A check of server-side resources used by ELEX Hide WooCommerce Shipping Methods
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.14 ▼6.15
Dashboard /wp-admin3.32 ▲0.0244.09 ▼0.17
Posts /wp-admin/edit.php3.37 ▲0.0247.54 ▲6.86
Add New Post /wp-admin/post-new.php5.90 ▲0.0281.25 ▼28.30
Media Library /wp-admin/upload.php3.24 ▲0.0234.01 ▼0.98

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for ELEX Hide WooCommerce Shipping Methods
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8513.26 ▼1.091.74 ▼0.1644.74 ▲0.74
Dashboard /wp-admin2,212 ▲246.00 ▲1.13102.74 ▼3.6338.36 ▼2.40
Posts /wp-admin/edit.php2,098 ▲62.00 ▲0.0040.18 ▼2.4434.24 ▼1.52
Add New Post /wp-admin/post-new.php1,562 ▲3318.01 ▼0.16602.89 ▼11.1572.67 ▲11.18
Media Library /wp-admin/upload.php1,394 ▲64.21 ▲0.0496.69 ▼6.5242.75 ▼1.72

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 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
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/elex-hide-woocommerce-shipping-methods-basic/review_and_troubleshoot_notify/resources/logo.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/elex-hide-woocommerce-shipping-methods-basic/review_and_troubleshoot_notify/resources/review.php:58
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/elex-hide-woocommerce-shipping-methods-basic/review_and_troubleshoot_notify/resources/troubleshoot.php:59
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/elex-hide-woocommerce-shipping-methods-basic/includes/market.php:87

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% 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
5 plugin tags: woocommerce, free shipping, hide shipping methods, hide, local pickup

elex-hide-woocommerce-shipping-methods-basic/elex-hide-shipping-methods.php 69% from 13 tests

The entry point to "ELEX Hide WooCommerce Shipping Methods" version 1.3.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 157 characters long)
  • Requires at least: The required version number must match the one declared in readme.txt ("3.0.1" instead of "2.6")
  • Main file name: The principal plugin file should be the same as the plugin slug ("elex-hide-woocommerce-shipping-methods-basic.php" instead of "elex-hide-shipping-methods.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin11,204 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
CSS336167,666
JavaScript3147221,600
PHP15100421,342
PO File2128141596

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity7.33
▷ Minimum class complexity4.00
▷ Maximum class complexity14.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods14
▷ Static methods214.29%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
8 PNG files occupy 0.41MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/bulk_edit.png77.83KB18.82KB▼ 75.82%
assets/icons/delete.png0.45KB0.20KB▼ 56.33%
assets/icons/chosen-sprite.png0.63KB0.88KB0.00%
resources/wsdesk.png163.82KB44.61KB▼ 72.77%
resources/dynamic_pricing.png92.32KB23.50KB▼ 74.55%