84% search-post-category

Code Review | Search Post Category

WordPress plugin Search Post Category scored84%from 54 tests.

About plugin

  • Plugin page: search-post-category
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-4.9.8
  • WordPress version: 6.3.1
  • First release: Aug 29, 2018
  • Latest release: Sep 2, 2018
  • Number of updates: 5
  • Update frequency: every 0.8 days
  • Top authors: roidev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /490 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Search Post Category
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.00 ▼6.10
Dashboard /wp-admin3.33 ▲0.0244.10 ▼3.91
Posts /wp-admin/edit.php3.38 ▲0.0248.58 ▲3.58
Add New Post /wp-admin/post-new.php5.93 ▲0.0483.95 ▼9.88
Media Library /wp-admin/upload.php3.25 ▲0.0234.16 ▲1.78
Search Post Category /wp-admin/options-general.php?page=searchpostcategory3.2231.20

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
spc_products
spc_posts
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Search Post Category
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲7913.39 ▼0.841.65 ▼0.5439.53 ▼7.54
Dashboard /wp-admin2,220 ▲295.09 ▼0.80115.70 ▲13.5038.22 ▼3.60
Posts /wp-admin/edit.php2,103 ▲142.29 ▲0.2536.54 ▲2.6933.31 ▼1.03
Add New Post /wp-admin/post-new.php6,248 ▲4,72926.29 ▲3.13913.10 ▲246.4457.65 ▲6.76
Media Library /wp-admin/upload.php1,402 ▲144.46 ▲0.2994.22 ▼4.7442.94 ▲0.68
Search Post Category /wp-admin/options-general.php?page=searchpostcategory8431.8328.1726.91

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • spc_posts
    • spc_products
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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 items
  • 1× 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/search-post-category/search-post-category.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
The official readme.txt might help

search-post-category/search-post-category.php 92% from 13 tests

The primary PHP file in "Search Post Category" version 1.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected276 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP18260237
CSS12036
JavaScript1003

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity26.00
▷ Minimum class complexity16.00
▷ Maximum class complexity36.00
Average method complexity5.55
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods218.18%
▷ Public methods11100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin