83% pagination-styler-for-woocommerce

Code Review | Pagination Styler for WooCommerce

WordPress plugin Pagination Styler for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: pagination-styler...
  • Plugin version: 3.5.7.8
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 15, 2016
  • Latest release: Sep 21, 2023
  • Number of updates: 64
  • Update frequency: every 40.6 days
  • Top authors: RazyRx (56.25%)dholovnia (45.31%)

Code review

54 tests

User reviews

11 reviews

Install metrics

1,000+ active /36,631 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲1.37MB] [CPU: ▲9.71ms] Passed 4 tests

A check of server-side resources used by Pagination Styler for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.85 ▲1.3953.79 ▲16.78
Dashboard /wp-admin4.68 ▲1.3465.44 ▲5.33
Posts /wp-admin/edit.php4.80 ▲1.4466.18 ▲18.70
Add New Post /wp-admin/post-new.php7.26 ▲1.3896.85 ▼0.79
Media Library /wp-admin/upload.php4.61 ▲1.3852.94 ▲17.50

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 85 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
br-pagination-options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
berocket_admin_notices_rate_stars
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Pagination Styler for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6414.19 ▼0.192.33 ▲0.6643.51 ▲2.57
Dashboard /wp-admin2,234 ▲595.71 ▼0.0683.04 ▼37.0675.08 ▲26.33
Posts /wp-admin/edit.php2,146 ▲462.02 ▲0.0438.90 ▲1.4535.19 ▼0.97
Add New Post /wp-admin/post-new.php1,579 ▲5323.21 ▼0.52733.64 ▲69.6855.55 ▼4.74
Media Library /wp-admin/upload.php1,436 ▲364.26 ▲0.09112.93 ▲15.1272.64 ▲26.77

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • berocket_admin_notices_rate_stars
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • berocket_key_activated_plugins

Smoke tests 75% 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 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
Please fix the following items
  • 21× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/pagination-styler-for-woocommerce/berocket/includes/updater.php:5
    • > PHP Notice
      Undefined variable: name in wp-content/plugins/pagination-styler-for-woocommerce/berocket/templates/conditions.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/pagination-styler-for-woocommerce/templates/style_section.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/pagination-styler-for-woocommerce/main.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pagination-styler-for-woocommerce/berocket/includes/information_notices.php:262
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/pagination-styler-for-woocommerce/berocket/includes/widget.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/pagination-styler-for-woocommerce/berocket/includes/settings_fields.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/pagination-styler-for-woocommerce/berocket/templates/settings_footer.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pagination-styler-for-woocommerce/berocket/includes/error_notices.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pagination-styler-for-woocommerce/berocket/libraries/popup.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (General settings), #2 (Style settings), #3 (Text settings)
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

pagination-styler-for-woocommerce/pagination-styler.php 85% from 13 tests

Analyzing the main PHP file in "Pagination Styler for WooCommerce" version 3.5.7.8
The following require your attention:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0" instead of "5.0")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("pagination-styler-for-woocommerce.php" instead of "pagination-styler.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected20,055 lines of code in 59 files:
LanguageFilesBlank linesComment linesLines of code
CSS142,513769,477
PHP354501,6608,402
JavaScript643581,701
PO File2194216430
XML20045

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity51.12
▷ Minimum class complexity1.00
▷ Maximum class complexity240.00
Average method complexity4.67
▷ Minimum method complexity1.00
▷ Maximum method complexity98.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes25
▷ Abstract classes00.00%
▷ Concrete classes25100.00%
▷ Final classes00.00%
Methods341
▷ Static methods13539.59%
▷ Public methods341100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
6 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
berocket/libraries/templates/default.png3.87KB2.63KB▼ 31.94%
berocket/assets/images/submenu-icon.png0.62KB0.50KB▼ 20.13%
berocket/assets/css/mail.png2.59KB1.92KB▼ 26.02%
berocket/libraries/addons/default.png3.87KB2.63KB▼ 31.94%
berocket/assets/images/submenu-icon-a.png0.54KB0.48KB▼ 10.20%