83% free-products-catalog

Code Review | Free Products Catalog

WordPress plugin Free Products Catalog scored83%from 54 tests.

About plugin

  • Plugin page: free-products-cat...
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9.3-5.9.2
  • WordPress version: 6.3.1
  • First release: May 18, 2022
  • Latest release: May 18, 2022
  • Number of updates: 10
  • Update frequency: N/A
  • Top authors: lgolabek (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /299 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼3.63ms] Passed 4 tests

Analyzing server-side resources used by Free Products Catalog
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1040.84 ▼0.33
Dashboard /wp-admin3.40 ▲0.1046.33 ▼1.79
Posts /wp-admin/edit.php3.45 ▲0.0946.62 ▲3.44
Add New Post /wp-admin/post-new.php5.98 ▲0.1083.10 ▼15.02
Media Library /wp-admin/upload.php3.32 ▲0.0935.33 ▲2.64
Products /wp-admin/edit.php?post_type=products3.3635.81
Add New /wp-admin/post-new.php?post_type=products3.4550.09
Products categories /wp-admin/edit-tags.php?taxonomy=products-cat&post_type=products3.3234.51
Products tags /wp-admin/edit-tags.php?taxonomy=products-tag&post_type=products3.3131.57

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Free Products Catalog
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲8313.16 ▼1.461.70 ▼0.3942.77 ▼2.94
Dashboard /wp-admin2,255 ▲735.83 ▼0.0597.05 ▼7.9939.46 ▲3.47
Posts /wp-admin/edit.php2,138 ▲462.06 ▲0.0936.59 ▼6.5436.58 ▼2.65
Add New Post /wp-admin/post-new.php1,570 ▲4223.45 ▲0.37643.47 ▼8.9350.84 ▼5.59
Media Library /wp-admin/upload.php1,437 ▲464.23 ▼0.02101.60 ▲3.0943.17 ▲1.19
Products /wp-admin/edit.php?post_type=products1,1112.0030.0029.00
Add New /wp-admin/post-new.php?post_type=products2,6477.79175.6870.65
Products categories /wp-admin/edit-tags.php?taxonomy=products-cat&post_type=products1,3082.1425.3827.52
Products tags /wp-admin/edit-tags.php?taxonomy=products-tag&post_type=products1,2832.1326.2529.46

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/free-products-catalog/templates/archive-no-grid-template.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/free-products-catalog/templates/archive-template.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/free-products-catalog/templates/single-product-template.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/free-products-catalog/templates/single-product-template-shop.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/free-products-catalog/webites-product-catalog.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === free-products-catalog === )
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4, #5 in free-products-catalog/assets to your readme.txt
You can look at the official readme.txt

free-products-catalog/webites-product-catalog.php 85% from 13 tests

The main file in "Free Products Catalog" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("free-products-catalog.php" instead of "webites-product-catalog.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Success! There were no dangerous files found in this plugin1,108 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP520450544
PO File3117156298
CSS2656266

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/product-card.png1.03KB0.27KB▼ 74.19%
public/img/test.PNG92.32KB48.60KB▼ 47.35%
public/img/product-default.png1.00KB0.27KB▼ 73.33%
public/img/simple.png0.83KB0.20KB▼ 75.98%
public/img/grid.png0.87KB0.21KB▼ 75.23%