83% quick-search-and-only-one-category-posting

Code Review | Quick Search Only One Category Posting

WordPress plugin Quick Search Only One Category Posting scored83%from 54 tests.

About plugin

  • Plugin page: quick-search-and-...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.8.2
  • WordPress version: 6.3.1
  • First release: Oct 23, 2017
  • Latest release: Oct 23, 2017
  • Number of updates: 14
  • Update frequency: N/A
  • Top authors: longbsvnu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /780 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.08MB] [CPU: ▼6.77ms] Passed 4 tests

This is a short check of server-side resources used by Quick Search Only One Category Posting
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0737.94 ▼1.60
Dashboard /wp-admin3.39 ▲0.0450.23 ▼11.75
Posts /wp-admin/edit.php3.51 ▲0.1551.06 ▲0.71
Add New Post /wp-admin/post-new.php6.00 ▲0.1188.93 ▼14.41
Media Library /wp-admin/upload.php3.31 ▲0.0835.34 ▲0.70
QSOOCP Setting /wp-admin/options-general.php?page=qsoocp-setting-admin3.2831.39

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Quick Search Only One Category Posting: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲5813.26 ▼0.954.46 ▲2.4838.57 ▼5.65
Dashboard /wp-admin2,210 ▲254.85 ▼1.01108.62 ▲4.1037.46 ▼3.90
Posts /wp-admin/edit.php2,099 ▲102.07 ▲0.0639.94 ▼2.9836.05 ▼2.36
Add New Post /wp-admin/post-new.php6,306 ▲4,79225.94 ▲2.48812.63 ▲178.9056.64 ▼0.62
Media Library /wp-admin/upload.php1,392 ▲14.32 ▼0.0099.39 ▲0.8543.18 ▲1.21
QSOOCP Setting /wp-admin/options-general.php?page=qsoocp-setting-admin1,0001.8630.5927.36

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/quick-search-and-only-one-category-posting/inc/settings-page.php:127
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/quick-search-and-only-one-category-posting/quick-search-only-one-category-posting.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Walker' not found in wp-content/plugins/quick-search-and-only-one-category-posting/inc/walker.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 83% 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 have no corresponding images in /assets: #1 (Quick Search Only Category Posting with checkbox.), #2 (Quick Search Only Category Posting with radio button.), #3 (Quick Search Only Category Posting with checkbox.), #4 (Quick Search Only Category Posting with radio button.), #5 (Settings Page.)
Please take inspiration from this readme.txt

quick-search-and-only-one-category-posting/quick-search-only-one-category-posting.php 69% from 13 tests

"Quick Search Only One Category Posting" version 1.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("4.0" instead of "4.4")
  • Main file name: The principal plugin file should be the same as the plugin slug ("quick-search-and-only-one-category-posting.php" instead of "quick-search-only-one-category-posting.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: Please don't use more than 140 characters for the plugin description (currently 352 characters long)

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
There were no executable files found in this plugin439 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP45961323
PO File1161656
JavaScript210645
CSS10015

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity6.33
▷ Minimum class complexity2.00
▷ Maximum class complexity9.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods11
▷ Static methods218.18%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.17MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png20.41KB6.09KB▼ 70.16%
screenshot-5.png64.28KB20.53KB▼ 68.06%
screenshot-2.png34.13KB7.96KB▼ 76.67%
screenshot-4.png21.42KB6.15KB▼ 71.27%
screenshot-1.png33.59KB8.51KB▼ 74.67%