84% category-filter

Code Review | Category filter

WordPress plugin Category filter scored84%from 54 tests.

About plugin

  • Plugin page: category-filter
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.2
  • WordPress version: 6.3.1
  • First release: Jul 6, 2015
  • Latest release: Jul 6, 2015
  • Number of updates: 4
  • Update frequency: every 0.8 days
  • Top authors: jeremywarne (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,511 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.00MB] [CPU: ▼1.82ms] Passed 4 tests

An overview of server-side resources used by Category filter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0147.73 ▲3.30
Dashboard /wp-admin3.31 ▲0.0049.19 ▼1.82
Posts /wp-admin/edit.php3.36 ▲0.0045.46 ▼1.77
Add New Post /wp-admin/post-new.php5.91 ▲0.0281.64 ▼6.78
Media Library /wp-admin/upload.php3.23 ▲0.0036.28 ▲3.08

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Category filter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4513.33 ▼1.091.67 ▼0.3444.83 ▼2.44
Dashboard /wp-admin2,211 ▲234.91 ▲0.04105.14 ▼11.8240.20 ▼4.51
Posts /wp-admin/edit.php2,094 ▲52.10 ▲0.0439.39 ▲0.2934.45 ▲1.03
Add New Post /wp-admin/post-new.php1,533 ▲1922.98 ▲5.41667.16 ▼26.7151.62 ▼5.90
Media Library /wp-admin/upload.php1,390 ▲24.22 ▲0.0196.90 ▼3.8940.69 ▼2.59

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 1× 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/category-filter/categoryfilter.php:13

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 issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Category Filter in the Edit Post section.) image not found
You can take inspiration from this readme.txt

category-filter/categoryfilter.php 92% from 13 tests

The main PHP script in "Category filter" version 1.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("category-filter.php" instead of "categoryfilter.php")

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 detected50 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript110744
PHP1366

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.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
1 PNG file occupies 0.08MB with 0.06MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png81.75KB20.96KB▼ 74.36%