84% filter-for-divi

Code Review | Filter for Divi

WordPress plugin Filter for Divi scored84%from 54 tests.

About plugin

  • Plugin page: filter-for-divi
  • Plugin version: 2.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3.2
  • WordPress version: 6.3.1
  • First release: Jul 6, 2020
  • Latest release: Oct 26, 2023
  • Number of updates: 33
  • Update frequency: every 36.7 days
  • Top authors: danielvoelk (100%)

Code review

54 tests

User reviews

23 reviews

Install metrics

2,000+ active /17,280 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
Installer ran successfully

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

Server-side resources used by Filter for Divi
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0235.24 ▼0.31
Dashboard /wp-admin3.32 ▲0.0149.97 ▲5.51
Posts /wp-admin/edit.php3.37 ▲0.0145.55 ▼3.98
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.00 ▼16.57
Media Library /wp-admin/upload.php3.24 ▲0.0134.78 ▲1.05

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Filter for Divi
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲11113.43 ▼0.999.02 ▲7.3238.35 ▼4.56
Dashboard /wp-admin2,192 ▲155.56 ▼0.0982.82 ▼9.9637.30 ▼7.60
Posts /wp-admin/edit.php2,097 ▼02.04 ▲0.0534.36 ▼4.6831.36 ▼11.64
Add New Post /wp-admin/post-new.php1,528 ▼023.13 ▲0.11674.78 ▲56.2363.32 ▲15.40
Media Library /wp-admin/upload.php1,400 ▼34.18 ▼0.09102.57 ▲1.6045.89 ▲1.58

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
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • 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 no errors were found, this is by no means 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/filter-for-divi/divifilter.php:31

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

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: divi theme, filterable gallery, filter

filter-for-divi/divifilter.php 92% from 13 tests

The principal PHP file in "Filter for Divi" v. 2.0.2 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("filter-for-divi.php" instead of "divifilter.php")

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 plugin91 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS191262
PHP1192428
JavaScript1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.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%
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

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin