77% infinite-scroll-product-for-woocommerce

Code Review | Infinite Scroll Product For WooCommerce

WordPress plugin Infinite Scroll Product For WooCommerce scored77%from 54 tests.

About plugin

  • Plugin page: infinite-scroll-p...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.3
  • WordPress version: 6.3.1
  • First release: Oct 6, 2023
  • Latest release: Oct 6, 2023
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: faridmia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /53 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▲6.22ms] Passed 4 tests

An overview of server-side resources used by Infinite Scroll Product For WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1741.10 ▲0.98
Dashboard /wp-admin3.60 ▲0.3062.50 ▲10.54
Posts /wp-admin/edit.php3.65 ▲0.3060.71 ▲9.52
Add New Post /wp-admin/post-new.php6.10 ▲0.21105.48 ▲4.19
Media Library /wp-admin/upload.php3.44 ▲0.2146.17 ▲10.17

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
can_compress_scripts
infinite_sp_woo_inf_basics
db_upgraded
infinite_sp_woo_inf_color
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Infinite Scroll Product For WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,055 ▲29415.26 ▲0.906.13 ▲4.3342.50 ▼3.28
Dashboard /wp-admin2,375 ▲1986.48 ▲0.82112.26 ▲23.3041.13 ▲0.94
Posts /wp-admin/edit.php2,301 ▲1983.53 ▲1.5151.12 ▲10.7532.86 ▼4.41
Add New Post /wp-admin/post-new.php1,719 ▲19122.41 ▼0.81632.76 ▼79.5439.76 ▼19.61
Media Library /wp-admin/upload.php1,440 ▲404.30 ▲0.0881.05 ▼21.0542.66 ▼3.94

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 does not fully uninstall, leaving 8 options in the database
    • infinite_sp_woo_inf_basics
    • widget_recent-posts
    • infinite_sp_woo_inf_color
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
The following issues need your attention
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/infinite-scroll-product-for-woocommerce/public/partials/infinite-scrolling-woo-public-display.php
    • > /wp-content/plugins/infinite-scroll-product-for-woocommerce/public/class-infinite-scrolling-woo-public.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/infinite-scroll-product-for-woocommerce/includes/functions.php:64

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 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
These attributes need your attention: The official readme.txt is a good inspiration

infinite-scroll-product-for-woocommerce/infinite-scroll-product-for-wooCommerce.php 77% from 13 tests

"Infinite Scroll Product For WooCommerce" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("infinite-scroll-product-for-woocommerce.php" instead of "infinite-scroll-product-for-wooCommerce.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 332 characters long)

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
There were no executable files found in this plugin1,146 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP15264643985
JavaScript1320131
CSS14430

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity7.50
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods59
▷ Static methods23.39%
▷ Public methods5491.53%
▷ Protected methods00.00%
▷ Private methods58.47%
Functions8
▷ Named functions675.00%
▷ Anonymous functions225.00%
Constants11
▷ Global constants11100.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
PNG images were not found in this plugin