77% hook-me-up-ajax-filter

Code Review | Hmu - Woocommerce ajax filter

WordPress plugin Hmu - Woocommerce ajax filter scored77%from 54 tests.

About plugin

  • Plugin page: hook-me-up-ajax-f...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-4.9
  • WordPress version: 6.3.1
  • First release: Nov 1, 2018
  • Latest release: Nov 1, 2018
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: wushu06 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /514 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.19MB] [CPU: ▼1.83ms] Passed 4 tests

This is a short check of server-side resources used by Hmu - Woocommerce ajax filter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1747.68 ▲5.79
Dashboard /wp-admin3.54 ▲0.2451.90 ▼3.25
Posts /wp-admin/edit.php3.59 ▲0.2356.38 ▼0.45
Add New Post /wp-admin/post-new.php6.06 ▲0.17101.32 ▼6.91
Media Library /wp-admin/upload.php3.40 ▲0.1737.70 ▲3.31

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 385 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Hmu - Woocommerce ajax filter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲4714.38 ▲0.102.49 ▲0.7945.24 ▲4.36
Dashboard /wp-admin2,210 ▲335.58 ▼0.0588.82 ▼6.1840.81 ▼1.71
Posts /wp-admin/edit.php2,112 ▲121.97 ▼0.0148.32 ▲13.0937.42 ▲5.03
Add New Post /wp-admin/post-new.php1,538 ▲723.39 ▲0.30643.57 ▼50.1658.35 ▲1.39
Media Library /wp-admin/upload.php1,406 ▲64.23 ▲0.0395.93 ▼13.5440.12 ▼6.65

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 detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/hook-me-up-ajax-filter/vendor/automattic/woocommerce/tests/bootstrap.php
  • 15× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'HmuWAF\\Base\\BaseController' not found in wp-content/plugins/hook-me-up-ajax-filter/inc/Api/Callbacks/FieldsCallbacks.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/hook-me-up-ajax-filter/vendor/automattic/woocommerce/tests/WooCommerce/Tests/HttpClient/OAuthTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'HmuWAF\\Base\\BaseController' not found in wp-content/plugins/hook-me-up-ajax-filter/inc/Pages/Fields.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/hook-me-up-ajax-filter/vendor/automattic/woocommerce/tests/WooCommerce/Tests/ClientTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'HmuWAF\\Base\\BaseController' not found in wp-content/plugins/hook-me-up-ajax-filter/inc/Filter/HmuAllTaxonomies.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/hook-me-up-ajax-filter/vendor/automattic/woocommerce/tests/WooCommerce/Tests/HttpClient/ResponseTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'HmuWAF\\Base\\BaseController' not found in wp-content/plugins/hook-me-up-ajax-filter/inc/Filter/HmuAjax.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'HmuWAF\\Base\\BaseController' not found in wp-content/plugins/hook-me-up-ajax-filter/inc/Base/SettingsLinks.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/hook-me-up-ajax-filter/vendor/automattic/woocommerce/tests/WooCommerce/Tests/HttpClient/HttpClientExceptionTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'HmuWAF\\Base\\BaseController' not found in wp-content/plugins/hook-me-up-ajax-filter/template/dashboard.php:4

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: filter, categories, woocommerce, taxonomies

hook-me-up-ajax-filter/hmu-ajax-filter.php 69% from 13 tests

The main PHP file in "Hmu - Woocommerce ajax filter" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Git Repository: There should be no Git repositories present in your plugin
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("hook-me-up-ajax-filter.php" instead of "hmu-ajax-filter.php")
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected3,212 lines of code in 377 files:
LanguageFilesBlank linesComment linesLines of code
PHP395191,0432,128
JavaScript32610951648
Markdown2660165
CSS383121
JSON300105
XML21026
YAML26019

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity6.55
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces10
Interfaces0
Traits0
Classes31
▷ Abstract classes00.00%
▷ Concrete classes31100.00%
▷ Final classes13.23%
Methods167
▷ Static methods116.59%
▷ Public methods14586.83%
▷ Protected methods2112.57%
▷ Private methods10.60%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants7
▷ Global constants114.29%
▷ Class constants685.71%
▷ Public constants6100.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
There are no PNG files in this plugin