10% niz-ajax-load-more-products-for-woocommerce

Code Review | Niz Ajax Load More Products for Woocommerce

WordPress plugin Niz Ajax Load More Products for Woocommerce scored10%from 54 tests.

About plugin

  • Plugin page: niz-ajax-load-mor...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: Mar 25, 2020
  • Latest release: Mar 25, 2020
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: nizapp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /448 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/niz-ajax-load-more-products-for-woocommerce/inc/class.niz-dependency-checker.php+25
    Undefined variable: _message

Server metrics [RAM: ▼1.88MB] [CPU: ▼49.12ms] Passed 4 tests

A check of server-side resources used by Niz Ajax Load More Products for Woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.366.22 ▼33.65
Dashboard /wp-admin2.12 ▼1.186.55 ▼43.40
Posts /wp-admin/edit.php2.12 ▼1.237.21 ▼39.18
Add New Post /wp-admin/post-new.php2.12 ▼3.767.24 ▼80.23
Media Library /wp-admin/upload.php2.12 ▼1.115.84 ▼27.23

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Niz Ajax Load More Products for Woocommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5813.18 ▼1.574.42 ▲2.1441.33 ▼4.25
Dashboard /wp-admin2,221 ▲335.84 ▲0.80104.96 ▼14.7238.76 ▼4.42
Posts /wp-admin/edit.php2,100 ▲112.01 ▼0.0034.45 ▲0.1335.26 ▼0.82
Add New Post /wp-admin/post-new.php1,551 ▲3723.09 ▲5.55658.57 ▼38.1650.04 ▼4.41
Media Library /wp-admin/upload.php1,406 ▲214.20 ▼0.0394.26 ▼6.8144.61 ▲3.87

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/niz-ajax-load-more-products-for-woocommerce/inc/class.niz-dependency-checker.php+25
    Undefined variable: _message
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/niz-ajax-load-more-products-for-woocommerce/niz_woo_ajax_loadmore.php
    • > /wp-content/plugins/niz-ajax-load-more-products-for-woocommerce/inc/class.niz-dependency-checker.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _n() in wp-content/plugins/niz-ajax-load-more-products-for-woocommerce/templates/result-count.php:5
    • > PHP Notice
      Undefined variable: total in wp-content/plugins/niz-ajax-load-more-products-for-woocommerce/templates/result-count.php on line 3
    • > PHP Notice
      Undefined variable: per_page in wp-content/plugins/niz-ajax-load-more-products-for-woocommerce/templates/result-count.php on line 3

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 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Ajax Loading on the Shop page), #2 (Ajax Loading with shortcode), #3 (Admin configuration page)
You can take inspiration from this readme.txt

niz-ajax-load-more-products-for-woocommerce/niz_woo_ajax_loadmore.php 77% from 13 tests

The entry point to "Niz Ajax Load More Products for Woocommerce" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: The domain path folder does not exist ("/languages/")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("niz-ajax-load-more-products-for-woocommerce.php" instead of "niz_woo_ajax_loadmore.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin435 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP59964350
JavaScript29061
CSS10024

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity8.00
▷ Minimum class complexity3.00
▷ Maximum class complexity17.00
Average method complexity1.74
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods28
▷ Static methods414.29%
▷ Public methods2485.71%
▷ Protected methods00.00%
▷ Private methods414.29%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin