78% anyday-woocommerce

Code Review | Anyday WooCommerce

WordPress plugin Anyday WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: anyday-woocommerce
  • Plugin version: 1.7.8
  • PHP compatiblity: 7.1.33+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0.3
  • WordPress version: 6.3.1
  • First release: Jun 3, 2021
  • Latest release: Oct 28, 2022
  • Number of updates: 43
  • Update frequency: every 11.9 days
  • Top authors: anyday2020 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /3,664 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
Installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼11.98ms] Passed 4 tests

An overview of server-side resources used by Anyday WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.88 ▼6.45
Dashboard /wp-admin3.31 ▼0.0451.12 ▼14.67
Posts /wp-admin/edit.php3.36 ▲0.0049.51 ▼9.26
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.75 ▼15.00
Media Library /wp-admin/upload.php3.23 ▲0.0034.70 ▼9.00

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Anyday WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.21 ▼1.341.95 ▼0.3042.14 ▼2.06
Dashboard /wp-admin2,221 ▲154.86 ▼0.06101.42 ▼6.4340.90 ▼3.83
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0135.81 ▼4.3935.60 ▼4.84
Add New Post /wp-admin/post-new.php1,554 ▲2318.23 ▼4.94646.16 ▲2.5351.75 ▼20.18
Media Library /wp-admin/upload.php1,397 ▼34.22 ▼0.20100.00 ▼3.1344.82 ▼1.52

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/anyday-woocommerce/includes/classes/AnydayEvents.php
    • > /wp-content/plugins/anyday-woocommerce/includes/classes/AnydayRest.php
  • 50× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/anyday-woocommerce/vendor/guzzlehttp/psr7/src/InflateStream.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/anyday-woocommerce/vendor/guzzlehttp/psr7/src/FnStream.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/anyday-woocommerce/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/anyday-woocommerce/vendor/guzzlehttp/psr7/src/DroppingStream.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\ResponseInterface' not found in wp-content/plugins/anyday-woocommerce/vendor/guzzlehttp/psr7/src/Response.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Cookie\\CookieJarInterface' not found in wp-content/plugins/anyday-woocommerce/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UriInterface' not found in wp-content/plugins/anyday-woocommerce/vendor/guzzlehttp/psr7/src/Uri.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/anyday-woocommerce/vendor/guzzlehttp/guzzle/src/Exception/TransferException.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/anyday-woocommerce/vendor/guzzlehttp/psr7/src/AppendStream.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/anyday-woocommerce/includes/classes/WC_Gateway_Anyday_Payment.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: bnpl, woocommerce, buy now pay later, anyday, conversion rate...

anyday-woocommerce/adm-core.php 85% from 13 tests

This is the main PHP file of "Anyday WooCommerce" version 1.7.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.3.1" instead of "5.2")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("anyday-woocommerce.php" instead of "adm-core.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin15,254 lines of code in 158 files:
LanguageFilesBlank linesComment linesLines of code
PHP1292,2906,25510,535
Markdown131,15503,483
JSON800605
PO File198106270
JavaScript2301166
CSS2240156
SVG10015
XML10015
make1409

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity14.42
▷ Minimum class complexity1.00
▷ Maximum class complexity88.00
Average method complexity2.93
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces10
Interfaces20
Traits3
Classes90
▷ Abstract classes00.00%
▷ Concrete classes90100.00%
▷ Final classes2022.22%
Methods804
▷ Static methods12415.42%
▷ Public methods66883.08%
▷ Protected methods40.50%
▷ Private methods13216.42%
Functions162
▷ Named functions6137.65%
▷ Anonymous functions10162.35%
Constants73
▷ Global constants1419.18%
▷ Class constants5980.82%
▷ Public constants59100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin