84% ab-categories-search-widget

Code Review | AB Categories Search Widget

WordPress plugin AB Categories Search Widget scored 84% from 54 tests.

About plugin

  • Plugin page: ab-categories-sea...
  • Plugin version: 0.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.7
  • WordPress version: 5.8.1
  • First release: Sep 22, 2013
  • Latest release: Feb 4, 2014
  • Number of updates: 15
  • Update frequency: every 9.0 days
  • Top authors: ajberasategui (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active / 6,453 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼149.20ms] Passed 4 tests

A check of server-side resources used by AB Categories Search Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.0524.54 ▲2.70
Dashboard /wp-admin3.11 ▲0.0433.48 ▼1.43
Posts /wp-admin/edit.php3.16 ▲0.0532.81 ▲3.87
Add New Post /wp-admin/post-new.php5.47 ▲0.0370.44 ▼599.21
Media Library /wp-admin/upload.php3.05 ▲0.0523.36 ▲1.13

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 1 new option
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by AB Categories Search Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,716 ▲11515.98 ▲0.255.80 ▲0.2678.30 ▼0.18
Dashboard /wp-admin2,926 ▲316.13 ▼0.14123.71 ▼11.53172.78 ▼3.08
Posts /wp-admin/edit.php2,743 ▲33.24 ▲0.0064.69 ▲0.65140.05 ▼2.65
Add New Post /wp-admin/post-new.php3,706 ▼2919.02 ▲0.85428.03 ▼66.53172.16 ▲2.68
Media Library /wp-admin/upload.php1,752 ▼05.49 ▼0.06147.27 ▲1.90185.81 ▲2.36

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 1 option in the database
    • widget_ab_cat_search

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ab-categories-search-widget/ab-category-search.php:29

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 errors were detected


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Widget configuration options.), #2 (Default widget appearance inserted on a theme.)
Please take inspiration from this readme.txt

ab-categories-search-widget/ab-category-search.php 92% from 13 tests

The main PHP file in "AB Categories Search Widget" ver. 0.2.5 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("ab-categories-search-widget.php" instead of "ab-category-search.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin335 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PO File22527120

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 issues
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions4100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin