90% woo-friendly-user-agent

Code Review | Friendly User Agent for WooCommerce

WordPress plugin Friendly User Agent for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: woo-friendly-user...
  • Plugin version: 1.3.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.0
  • WordPress version: 6.3.1
  • First release: Sep 6, 2018
  • Latest release: Jun 23, 2022
  • Number of updates: 15
  • Update frequency: every 92.5 days
  • Top authors: blazeconcepts (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

600+ active /3,699 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.26ms] Passed 4 tests

This is a short check of server-side resources used by Friendly User Agent for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.84 ▲0.42
Dashboard /wp-admin3.36 ▲0.0645.84 ▼5.76
Posts /wp-admin/edit.php3.41 ▲0.0650.69 ▲5.37
Add New Post /wp-admin/post-new.php5.94 ▲0.0682.50 ▼15.58
Media Library /wp-admin/upload.php3.28 ▲0.0635.63 ▼4.10

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Friendly User Agent for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.08 ▼0.181.81 ▲0.2237.08 ▼5.41
Dashboard /wp-admin2,195 ▲155.60 ▼0.0887.14 ▲2.1437.10 ▼6.89
Posts /wp-admin/edit.php2,103 ▲31.95 ▼0.0338.71 ▲4.6335.83 ▲0.77
Add New Post /wp-admin/post-new.php1,526 ▼023.08 ▲0.02669.62 ▼11.3151.84 ▼1.75
Media Library /wp-admin/upload.php1,400 ▼34.29 ▲0.1894.45 ▼10.9239.62 ▼5.97

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 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)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: browser, reporting, mobile, user agent, woocommerce

woo-friendly-user-agent/woo-friendly-user-agent.php 92% from 13 tests

"Friendly User Agent for WooCommerce" version 1.3.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("4.0" instead of "3.0.0")

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 plugin320 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP25157320

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.56
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions777.78%
▷ Anonymous functions222.22%
Constants0
▷ Global constants00.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
26 PNG files occupy 0.16MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
files/img/amazon-logo.png2.82KB1.33KB▼ 52.70%
files/img/1x1.png46.20KB0.09KB▼ 99.80%
files/img/firefox-logo.png4.13KB1.40KB▼ 66.12%
files/img/safari-logo.png3.93KB1.33KB▼ 66.05%
files/img/vivaldi-logo.png3.64KB1.28KB▼ 64.96%