84% ab-categories-search-widget

Code Review | AB Categories Search Widget

WordPress plugin AB Categories Search Widget scored84%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: 6.3.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

90+ active /6,717 total downloads

Benchmarks

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: ▼9.32ms] Passed 4 tests

Analyzing server-side resources used by AB Categories Search Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.70 ▼1.33
Dashboard /wp-admin3.36 ▲0.0149.94 ▼13.99
Posts /wp-admin/edit.php3.41 ▲0.0545.42 ▼5.92
Add New Post /wp-admin/post-new.php5.94 ▲0.0583.45 ▼16.03
Media Library /wp-admin/upload.php3.28 ▲0.0538.03 ▲3.88

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_ab_cat_search
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by AB Categories Search Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.44 ▲0.071.96 ▲0.2540.14 ▲2.83
Dashboard /wp-admin2,203 ▲125.81 ▼0.1099.46 ▼4.9638.54 ▼5.44
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0133.98 ▼7.2335.79 ▼0.42
Add New Post /wp-admin/post-new.php1,538 ▲322.67 ▼0.55668.13 ▼16.1356.16 ▲0.25
Media Library /wp-admin/upload.php1,385 ▼64.24 ▼0.01101.56 ▲3.5044.74 ▼1.62

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_ab_cat_search
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

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 no errors were found, this is by no means 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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings 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 | 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

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (Widget configuration options.), #2 (Default widget appearance inserted on a theme.)
The official readme.txt might help

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

The main file in "AB Categories Search Widget" v. 0.2.5 serves as a complement to information provided in readme.txt and as the entry point to the 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 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin335 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP11937215
PO File22527120

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
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
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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
PNG images were not found in this plugin