84% gravity-forms-recently-viewed-products

Code Review | Gravity Forms / WooCommerce Recently Viewed Products

WordPress plugin Gravity Forms / WooCommerce Recently Viewed Products scored84%from 54 tests.

About plugin

  • Plugin page: gravity-forms-rec...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.9
  • WordPress version: 6.3.1
  • First release: May 12, 2014
  • Latest release: May 22, 2014
  • Number of updates: 3
  • Update frequency: every 7.7 days
  • Top authors: Mike_Cowobo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,302 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
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Gravity Forms / WooCommerce Recently Viewed Products
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.73 ▼6.70
Dashboard /wp-admin3.32 ▲0.0145.57 ▼4.90
Posts /wp-admin/edit.php3.37 ▲0.0145.50 ▼2.56
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.10 ▼7.25
Media Library /wp-admin/upload.php3.24 ▲0.0136.71 ▲1.76

Server storage [IO: ▲0.01MB] [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: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Gravity Forms / WooCommerce Recently Viewed Products
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.19 ▼1.391.97 ▲0.0741.77 ▲2.82
Dashboard /wp-admin2,209 ▲184.86 ▼0.02104.45 ▼0.7439.94 ▼8.69
Posts /wp-admin/edit.php2,092 ▲32.03 ▲0.0239.16 ▲2.4433.59 ▼1.16
Add New Post /wp-admin/post-new.php1,517 ▲317.75 ▲0.13602.78 ▼64.9153.46 ▼1.70
Media Library /wp-admin/upload.php1,382 ▼34.20 ▼0.0297.40 ▼3.0640.54 ▼2.89

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% 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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/gravity-forms-recently-viewed-products/plugin.php:31

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 errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: forms, gravity forms, click stream, recent products, woocommerce

gravity-forms-recently-viewed-products/plugin.php 92% from 13 tests

Analyzing the main PHP file in "Gravity Forms / WooCommerce Recently Viewed Products" version 1.1
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("gravity-forms-recently-viewed-products.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin132 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP34759132

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity9.00
▷ Minimum class complexity3.00
▷ Maximum class complexity15.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ Public methods555.56%
▷ Protected methods333.33%
▷ Private methods111.11%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ 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
There were not PNG files found in your plugin