90% featured-products-by-category

Code Review | Featured Products by Category

WordPress plugin Featured Products by Category scored 90% from 54 tests.

About plugin

  • Plugin page: featured-products...
  • Plugin version: 1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.4
  • WordPress version: 6.3.1
  • First release: Jul 9, 2020
  • Latest release: Jul 19, 2020
  • Number of updates: 4
  • Update frequency: every 2.8 days
  • Top authors: jameskira (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 1,133 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
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.79ms] Passed 4 tests

Analyzing server-side resources used by Featured Products by Category
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0136.80 ▼2.02
Dashboard /wp-admin3.31 ▲0.0045.94 ▼6.64
Posts /wp-admin/edit.php3.36 ▲0.0047.41 ▲1.83
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.86 ▼6.97
Media Library /wp-admin/upload.php3.23 ▲0.0036.19 ▲0.47

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Featured Products by Category
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲3613.16 ▲0.015.13 ▲3.5140.89 ▼4.21
Dashboard /wp-admin2,206 ▼04.81 ▼0.0297.39 ▼3.3438.56 ▼0.08
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0139.73 ▲5.2735.79 ▲4.59
Add New Post /wp-admin/post-new.php1,537 ▲423.09 ▲0.08671.87 ▼9.8856.79 ▲0.47
Media Library /wp-admin/upload.php1,388 ▲34.21 ▼0.04103.88 ▼5.6744.43 ▼1.31

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
There were no plugin tags found

featured-products-by-category/jvl-featured-product-by-category.php 92% from 13 tests

The main PHP script in "Featured Products by Category" version 1.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("featured-products-by-category.php" instead of "jvl-featured-product-by-category.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected59 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1281059

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods133.33%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected