90% woo-most-viewed-products

Code Review | WooCommerce Most Viewed Products

WordPress plugin WooCommerce Most Viewed Products scored90%from 54 tests.

About plugin

  • Plugin page: woo-most-viewed-p...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 6.3.1
  • First release: Jan 9, 2016
  • Latest release: Jan 9, 2016
  • Number of updates: 4
  • Update frequency: every 0.8 days
  • Top authors: wpdelighter (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active /3,242 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by WooCommerce Most Viewed Products
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.99 ▼2.85
Dashboard /wp-admin3.31 ▼0.0448.75 ▼14.37
Posts /wp-admin/edit.php3.36 ▲0.0045.67 ▲2.27
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.76 ▼8.40
Media Library /wp-admin/upload.php3.23 ▲0.0031.27 ▼4.17

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Most Viewed Products
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.33 ▼1.311.87 ▼0.1044.52 ▲0.90
Dashboard /wp-admin2,209 ▲185.91 ▲1.02103.89 ▼7.5142.20 ▲1.08
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0433.45 ▼4.0531.51 ▼1.67
Add New Post /wp-admin/post-new.php1,533 ▲1423.21 ▼0.25657.18 ▼8.4352.14 ▼1.06
Media Library /wp-admin/upload.php1,388 ▲64.18 ▼0.0496.56 ▼14.3642.47 ▼4.62

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: most viewed, popular products, most visted products, product view count, woocommerce...

woo-most-viewed-products/woo-most-viewed-products.php Passed 13 tests

"WooCommerce Most Viewed Products" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
54 characters long description:
Display a list of most viewed products on WooCommerce.

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
Good job! No executable or dangerous file extensions detected221 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP435119221

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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