94% wp-terms-filter

Code Review | Wordpress Backend Terms Filter

WordPress plugin Wordpress Backend Terms Filter scored 94% from 54 tests.

About plugin

  • Plugin page: wp-terms-filter
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8
  • WordPress version: 5.8.1
  • First release: Aug 15, 2017
  • Latest release: Aug 15, 2017
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: evgendob (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 421 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼138.86ms] Passed 4 tests

An overview of server-side resources used by Wordpress Backend Terms Filter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1236.23 ▲14.28
Dashboard /wp-admin3.09 ▲0.0345.91 ▲4.28
Posts /wp-admin/edit.php3.20 ▲0.0939.17 ▼4.34
Add New Post /wp-admin/post-new.php5.43 ▼0.0189.34 ▼555.53
Media Library /wp-admin/upload.php3.01 ▲0.0132.57 ▲0.14

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Wordpress Backend Terms Filter: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,910 ▲31417.57 ▲1.808.47 ▼1.0843.94 ▼11.82
Dashboard /wp-admin3,199 ▲2688.02 ▲1.90155.84 ▲17.64118.58 ▼4.58
Posts /wp-admin/edit.php2,969 ▲2304.30 ▲1.5981.71 ▲19.3389.12 ▼3.47
Add New Post /wp-admin/post-new.php1,619 ▼6421.63 ▲2.97253.61 ▼129.05117.10 ▲5.77
Media Library /wp-admin/upload.php1,815 ▲54.79 ▼0.24113.13 ▼28.40117.94 ▼6.30

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-terms-filter/modules/hooks.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-terms-filter/modules/hooks.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-terms-filter/modules/scripts.php:3

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

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (New filed for terms filtering), #2 (Filtering result)
The official readme.txt might help

wp-terms-filter/wp-terms-filter.php Passed 13 tests

The main PHP script in "Wordpress Backend Terms Filter" version 1.0 is automatically included on every request by WordPress
122 characters long description:
With this simple plugin you can add filtering functionality to your terms in backend, and use it when you make your posts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin74 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript218243
PHP319831

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions2
▷ Named functions2100.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
2 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png25.13KB9.97KB▼ 60.34%
screenshot-2.png24.66KB9.83KB▼ 60.13%