84% wp-search-category-admin

Code Review | WP search category admin

WordPress plugin WP search category admin scored84%from 54 tests.

About plugin

  • Plugin page: wp-search-categor...
  • Plugin version: 1.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Jul 3, 2017
  • Latest release: May 15, 2023
  • Number of updates: 24
  • Update frequency: every 89.5 days
  • Top authors: cdecou (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

300+ active /2,455 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
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by WP search category admin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.26 ▲0.38
Dashboard /wp-admin3.32 ▲0.0248.34 ▼2.99
Posts /wp-admin/edit.php3.38 ▲0.0261.93 ▲8.74
Add New Post /wp-admin/post-new.php5.93 ▲0.0486.58 ▼15.07
Media Library /wp-admin/upload.php3.25 ▲0.0237.04 ▲1.74

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for WP search category admin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.70 ▲0.291.67 ▼0.1939.29 ▼2.55
Dashboard /wp-admin2,211 ▲345.65 ▼0.0292.02 ▼5.9239.34 ▼3.10
Posts /wp-admin/edit.php2,127 ▲271.99 ▲0.0340.56 ▲4.2742.56 ▲8.83
Add New Post /wp-admin/post-new.php1,547 ▲2123.21 ▼0.07649.96 ▼48.0862.49 ▲7.42
Media Library /wp-admin/upload.php1,413 ▲134.19 ▲0.0097.39 ▲0.9543.96 ▲1.52

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_admin_page_title() in wp-content/plugins/wp-search-category-admin/views/admin/option-page.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-search-category-admin/wp-search-cat-admin.php:14

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

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: admin, category, search, box, post

wp-search-category-admin/wp-search-cat-admin.php 92% from 13 tests

"WP search category admin" version 1.5.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-search-category-admin.php" instead of "wp-search-cat-admin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin243 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript22110109
PHP3161398
Markdown113029
CSS1107

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods125.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
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