83% favo

Code Review | Favo - Woocommerce Product Favorite

WordPress plugin Favo - Woocommerce Product Favorite scored83%from 54 tests.

About plugin

  • Plugin page: favo
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8
  • WordPress version: 6.3.1
  • First release: May 1, 2018
  • Latest release: May 1, 2018
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: arifrohmanhakim (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /573 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.70ms] Passed 4 tests

An overview of server-side resources used by Favo - Woocommerce Product Favorite
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.73 ▼6.89
Dashboard /wp-admin3.32 ▲0.0246.83 ▼2.02
Posts /wp-admin/edit.php3.37 ▲0.0250.47 ▼1.01
Add New Post /wp-admin/post-new.php5.90 ▲0.0282.75 ▼20.87
Media Library /wp-admin/upload.php3.24 ▲0.0135.48 ▲2.47

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Favo - Woocommerce Product Favorite
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.65 ▼1.001.98 ▲0.1843.38 ▼3.81
Dashboard /wp-admin2,210 ▲254.84 ▼0.08104.18 ▼7.1839.38 ▼2.03
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0041.12 ▼0.2136.32 ▲0.80
Add New Post /wp-admin/post-new.php1,537 ▲423.15 ▲0.17671.97 ▲72.7757.15 ▲6.91
Media Library /wp-admin/upload.php1,395 ▲74.25 ▲0.0498.01 ▼3.2140.68 ▼1.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/favo/inc/helpers.php:5
    • > PHP Warning
      Use of undefined constant FAVO_VERSION - assumed 'FAVO_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/favo/views/admin/page-setting.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function favo_setting() in wp-content/plugins/favo/views/admin/page-setting.php:16

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (Favo on action.), #2 (General Options.), #3 (Button Options.), #4 (Message options.)
You can take inspiration from this readme.txt

favo/favo.php 85% from 13 tests

The principal PHP file in "Favo - Woocommerce Product Favorite" v. 1.0.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.5" instead of "3.0")
  • Domain Path: The domain path points to a folder that does not exist ("/lang")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected919 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP573162583
CSS284192
JavaScript21721144

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity15.67
▷ Minimum class complexity3.00
▷ Maximum class complexity39.00
Average method complexity3.53
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1794.44%
▷ Protected methods00.00%
▷ Private methods15.56%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants5
▷ Global constants5100.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
There were not PNG files found in your plugin