83% load-more-products-for-woocommerce

Code Review | Load More Products for WooCommerce

WordPress plugin Load More Products for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: load-more-product...
  • Plugin version: 1.1.9.9
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 25, 2015
  • Latest release: Sep 21, 2023
  • Number of updates: 87
  • Update frequency: every 33.3 days
  • Top authors: RazyRx (52.87%)dholovnia (48.28%)

Code review

54 tests

User reviews

241 reviews

Install metrics

20,000+ active /280,116 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
Install script ran successfully

Server metrics [RAM: ▲1.52MB] [CPU: ▲4.32ms] Passed 4 tests

Server-side resources used by Load More Products for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /5.00 ▲1.5346.35 ▲8.10
Dashboard /wp-admin4.82 ▲1.5256.36 ▲7.77
Posts /wp-admin/edit.php4.93 ▲1.5761.46 ▲9.86
Add New Post /wp-admin/post-new.php7.40 ▲1.5196.04 ▼8.46
Media Library /wp-admin/upload.php4.74 ▲1.5148.58 ▲15.48

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Load More Products for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲7113.57 ▼1.101.61 ▼0.1042.58 ▼1.68
Dashboard /wp-admin2,211 ▲264.84 ▼1.05101.97 ▲0.1767.57 ▲25.76
Posts /wp-admin/edit.php2,106 ▲172.05 ▲0.0236.42 ▼2.8433.66 ▲0.57
Add New Post /wp-admin/post-new.php1,530 ▲217.68 ▼0.50725.48 ▲114.4756.64 ▼7.20
Media Library /wp-admin/upload.php1,402 ▲144.16 ▼0.0598.54 ▼1.0772.11 ▲29.50

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
These items require your attention
  • The uninstall procedure has failed, leaving 8 options in the database
    • berocket_admin_notices_rate_stars
    • berocket_key_activated_plugins
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 22× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/load-more-products-for-woocommerce/berocket/libraries/popup.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/load-more-products-for-woocommerce/berocket/sale/sale.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/load-more-products-for-woocommerce/includes/main.php:6
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/load-more-products-for-woocommerce/berocket/templates/widget.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/load-more-products-for-woocommerce/berocket/includes/error_notices.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/load-more-products-for-woocommerce/main.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/load-more-products-for-woocommerce/berocket/framework.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/load-more-products-for-woocommerce/berocket/includes/settings_fields.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/load-more-products-for-woocommerce/berocket/includes/admin_notices.php:797
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/load-more-products-for-woocommerce/berocket/libraries/tippy.php:7

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 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (General settings), #2 (Button settings), #3 (Selectors settings)
  • Tags: Please delete some tags, you are using 28 tag instead of maximum 10
The official readme.txt is a good inspiration

load-more-products-for-woocommerce/load-more-products.php 85% from 13 tests

The principal PHP file in "Load More Products for WooCommerce" v. 1.1.9.9 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Main file name: Name the main plugin file the same as the plugin slug ("load-more-products-for-woocommerce.php" instead of "load-more-products.php")

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 plugin22,652 lines of code in 68 files:
LanguageFilesBlank linesComment linesLines of code
CSS182,517859,730
PHP354761,0279,356
JavaScript1058683,007
PO File3229251514
XML20045

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity48.26
▷ Minimum class complexity1.00
▷ Maximum class complexity240.00
Average method complexity4.52
▷ Minimum method complexity1.00
▷ Maximum method complexity98.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes27
▷ Abstract classes00.00%
▷ Concrete classes27100.00%
▷ Final classes00.00%
Methods363
▷ Static methods13838.02%
▷ Public methods363100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions33
▷ Named functions33100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
18 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
berocket/assets/images/submenu-icon.png0.62KB0.50KB▼ 20.13%
berocket/libraries/addons/default.png3.87KB2.63KB▼ 31.94%
berocket/includes/ico.png1.90KB1.41KB▼ 25.89%
css/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.27KB0.18KB▼ 35.00%
css/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%