84% c4d-woo-filter

Code Review | C4D Woo Filter

WordPress plugin C4D Woo Filter scored84%from 54 tests.

About plugin

  • Plugin page: c4d-woo-filter
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.2.1
  • WordPress version: 6.3.1
  • First release: Jun 19, 2019
  • Latest release: Jul 5, 2019
  • Number of updates: 8
  • Update frequency: every 22.9 days
  • Top authors: coffee4dev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /920 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼6.16ms] Passed 4 tests

This is a short check of server-side resources used by C4D Woo Filter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0847.44 ▲2.94
Dashboard /wp-admin3.38 ▲0.0352.83 ▼15.17
Posts /wp-admin/edit.php3.49 ▲0.1452.55 ▼2.66
Add New Post /wp-admin/post-new.php5.96 ▲0.0799.15 ▼7.05
Media Library /wp-admin/upload.php3.30 ▲0.0741.65 ▲0.26

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_c4d-woo-filter-widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by C4D Woo Filter
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲15113.49 ▼0.889.47 ▲7.7242.78 ▲1.38
Dashboard /wp-admin2,195 ▲215.68 ▲0.0292.71 ▼3.2143.73 ▲2.67
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0240.95 ▼0.0438.69 ▲0.18
Add New Post /wp-admin/post-new.php1,526 ▼023.60 ▲0.40699.25 ▲94.1958.49 ▲12.11
Media Library /wp-admin/upload.php1,403 ▼04.23 ▲0.02129.18 ▲29.9954.30 ▲8.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_c4d-woo-filter-widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/c4d-woo-filter/includes/hook.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/c4d-woo-filter/c4d-woo-filter.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/c4d-woo-filter/includes/shortcodes.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/c4d-woo-filter/includes/widgets.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

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
1 plugin tags: woocommerce

c4d-woo-filter/c4d-woo-filter.php Passed 13 tests

The main PHP file in "C4D Woo Filter" ver. 1.0.7 adds more information about the plugin and also serves as the entry point for this plugin
64 characters long description:
C4D Woo Filter - create filter by ajax for WooCommerce category.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected810 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript24024347
PHP43836279
Sass134183
CSS1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions1794.44%
▷ Anonymous functions15.56%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin