84% search-limiter-blocker

Code Review | Search Limiter & Blocker

WordPress plugin Search Limiter & Blocker scored 84% from 54 tests.

About plugin

  • Plugin page: search-limiter-bl...
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.2
  • WordPress version: 6.3.1
  • First release: Jun 29, 2019
  • Latest release: Jun 29, 2019
  • Number of updates: 8
  • Update frequency: N/A
  • Top authors: kaisercrazy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 1,269 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.54MB] [CPU: ▼27.01ms] Passed 4 tests

A check of server-side resources used by Search Limiter & Blocker
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.80 ▼0.6613.00 ▼29.82
Dashboard /wp-admin3.24 ▼0.0733.99 ▼15.02
Posts /wp-admin/edit.php3.17 ▼0.1931.36 ▼14.45
Add New Post /wp-admin/post-new.php4.64 ▼1.2547.17 ▼48.75
Media Library /wp-admin/upload.php3.27 ▲0.0435.60 ▼0.22
Search Limiter & Blocker /wp-admin/options-general.php?page=search-limiter-blocker3.2329.20

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Search Limiter & Blocker
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.20 ▼1.171.62 ▼0.3840.06 ▼5.60
Dashboard /wp-admin2,210 ▲225.86 ▲0.9896.57 ▼13.0739.68 ▼7.87
Posts /wp-admin/edit.php2,090 ▲12.18 ▲0.1239.98 ▲2.4934.37 ▲1.78
Add New Post /wp-admin/post-new.php1,537 ▲1823.28 ▲0.22613.89 ▲21.7450.85 ▼0.17
Media Library /wp-admin/upload.php1,392 ▲44.17 ▼0.0296.16 ▼0.4241.65 ▼1.68
Search Limiter & Blocker /wp-admin/options-general.php?page=search-limiter-blocker7912.0624.7329.40

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
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/search-limiter-blocker/search-limiter-blocker.php:19

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% 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
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (The Settings Page screenshot-1.png)
Please take inspiration from this readme.txt

search-limiter-blocker/search-limiter-blocker.php Passed 13 tests

The main file in "Search Limiter & Blocker" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
71 characters long description:
Set and limit search count of visitors. Also, you can block visitor IP.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin176 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13319146
Markdown114030

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png30.44KB8.93KB▼ 70.66%