67% product-feed-viewer

Code Review | Product Feed Viewer

WordPress plugin Product Feed Viewer scored67%from 54 tests.

About plugin

  • Plugin page: product-feed-viewer
  • Plugin version: 1.0.9.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.2.4
  • WordPress version: 6.3.1
  • First release: Sep 17, 2013
  • Latest release: Nov 12, 2019
  • Number of updates: 27
  • Update frequency: every 83.4 days
  • Top authors: advivadk (77.78%)dennisdrejer (25.93%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,743 total downloads

Benchmarks

Plugin footprint 65% 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.95MB] [CPU: ▼30.79ms] Passed 4 tests

An overview of server-side resources used by Product Feed Viewer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.21 ▼0.92
Dashboard /wp-admin3.00 ▼0.3124.23 ▼22.44
Posts /wp-admin/edit.php3.00 ▼0.3622.74 ▼24.45
Add New Post /wp-admin/post-new.php3.00 ▼2.8925.57 ▼66.90
Media Library /wp-admin/upload.php3.00 ▼0.2324.24 ▼9.37
Product Feed Viewer /wp-admin/options-general.php?page=product-feed-viewer/pfv.php3.0025.31

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
pfv_license
widget_theysaidso_widget
widget_recent-comments
pfv_db_version
widget_recent-posts

Browser metrics Passed 4 tests

Product Feed Viewer: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.68 ▼0.704.71 ▲2.9043.79 ▲3.66
Dashboard /wp-admin2,210 ▲185.83 ▲0.9397.25 ▼21.4138.74 ▼5.83
Posts /wp-admin/edit.php2,096 ▲72.02 ▼0.0439.56 ▼2.5035.18 ▼0.76
Add New Post /wp-admin/post-new.php1,538 ▲523.15 ▼0.14674.70 ▲21.2052.48 ▼11.06
Media Library /wp-admin/upload.php1,392 ▲74.17 ▼0.0594.52 ▼7.1344.57 ▲0.33
Product Feed Viewer /wp-admin/options-general.php?page=product-feed-viewer/pfv.php1,1372.0323.2135.92

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • The uninstall procedure has failed, leaving 8 options in the database
    • db_upgraded
    • widget_recent-comments
    • pfv_db_version
    • can_compress_scripts
    • theysaidso_admin_options
    • pfv_license
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=product-feed-viewer/pfv.php
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function update_option() in wp-content/plugins/product-feed-viewer/function.php:63
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/product-feed-viewer/pfv.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: No valid plugin tags found
  • Screenshots: Add an image for screenshot #1 (2.)
  • Donate link: Please fix this invalid URI: ""
The official readme.txt is a good inspiration

product-feed-viewer/pfv.php 85% from 13 tests

The main PHP file in "Product Feed Viewer" ver. 1.0.9.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 150 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("product-feed-viewer.php" instead of "pfv.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected566 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP292121566

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.60
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin