89% friendly-functions-for-welcart

Code Review | Friendly Functions for Welcart

WordPress plugin Friendly Functions for Welcart scored89%from 54 tests.

About plugin

  • Plugin page: friendly-function...
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Apr 27, 2021
  • Latest release: Nov 20, 2023
  • Number of updates: 24
  • Update frequency: every 39.2 days
  • Top authors: mainichiweb (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

800+ active /5,197 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: ▼2.01ms] Passed 4 tests

Analyzing server-side resources used by Friendly Functions for Welcart
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.01 ▼3.49
Dashboard /wp-admin3.31 ▲0.0147.61 ▲0.91
Posts /wp-admin/edit.php3.36 ▲0.0149.36 ▲2.40
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.03 ▼0.08
Media Library /wp-admin/upload.php3.24 ▲0.0133.62 ▼5.36
Friendly Functions for Welcart /wp-admin/options-general.php?page=ffw_function_settings3.5331.80

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Friendly Functions for Welcart: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3414.25 ▼0.121.76 ▼0.0045.63 ▲0.72
Dashboard /wp-admin2,204 ▲275.62 ▲0.0892.80 ▲1.9041.87 ▲3.73
Posts /wp-admin/edit.php2,106 ▲92.01 ▲0.0639.20 ▲4.5235.16 ▼0.65
Add New Post /wp-admin/post-new.php1,534 ▲723.04 ▼0.10585.11 ▼74.8452.87 ▼5.06
Media Library /wp-admin/upload.php1,406 ▲34.20 ▲0.0197.99 ▼4.4044.31 ▼0.40
Friendly Functions for Welcart /wp-admin/options-general.php?page=ffw_function_settings9542.9941.0124.44

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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 SRP test was a success

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI found ("")
The official readme.txt is a good inspiration

friendly-functions-for-welcart/friendly-functions-for-welcart.php 92% from 13 tests

The primary PHP file in "Friendly Functions for Welcart" version 1.2.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder was not found ("/languages/")

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
Everything looks great! No dangerous files found in this plugin2,347 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP61371351,547
CSS21007477
JavaScript3932323

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
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%
Functions63
▷ Named functions63100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
other_tab/img/logo-ffw_square_350.png8.80KB3.05KB▼ 65.30%
other_tab/img/logo-tfs_square_350.png5.34KB2.50KB▼ 53.16%
other_tab/img/logo-cps_square_350.png8.00KB2.89KB▼ 63.88%
other_tab/img/logo-tcw_square_350.png5.16KB2.67KB▼ 48.27%
other_tab/img/logo-pnp_square_350.png6.37KB3.09KB▼ 51.47%