84% c4d-woo-category-product-perpage

Code Review | C4D Woo Category Product Perpage

WordPress plugin C4D Woo Category Product Perpage scored84%from 54 tests.

About plugin

  • Plugin page: c4d-woo-category-...
  • Plugin version: 2.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Feb 17, 2017
  • Latest release: Nov 15, 2018
  • Number of updates: 14
  • Update frequency: every 45.4 days
  • Top authors: coffee4dev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /988 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.07ms] Passed 4 tests

Analyzing server-side resources used by C4D Woo Category Product Perpage
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.97 ▼4.56
Dashboard /wp-admin3.33 ▲0.0245.76 ▼4.54
Posts /wp-admin/edit.php3.38 ▲0.0243.52 ▼2.75
Add New Post /wp-admin/post-new.php5.91 ▲0.0280.87 ▼20.43
Media Library /wp-admin/upload.php3.25 ▲0.0233.54 ▼1.96

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

C4D Woo Category Product Perpage: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲12613.61 ▼0.746.86 ▲4.8545.30 ▼6.14
Dashboard /wp-admin2,203 ▲184.84 ▼0.04114.49 ▲3.9043.13 ▼1.68
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0335.50 ▼3.7334.70 ▼0.46
Add New Post /wp-admin/post-new.php1,524 ▲422.98 ▼0.00631.89 ▼51.8055.74 ▼10.33
Media Library /wp-admin/upload.php1,385 ▼34.19 ▼0.0098.76 ▼9.8142.26 ▼2.66

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
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/c4d-woo-category-product-perpage/c4d-woo-category-product-perpage.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_get_default_products_per_row() in wp-content/plugins/c4d-woo-category-product-perpage/templates/default.php:5

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
You can look at the official readme.txt

c4d-woo-category-product-perpage/c4d-woo-category-product-perpage.php 92% from 13 tests

The primary PHP file in "C4D Woo Category Product Perpage" version 2.0.4 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin109 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2139100
JavaScript2009

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin