89% restricted-search

Code Review | Restricted Search

WordPress plugin Restricted Search scored89%from 54 tests.

About plugin

  • Plugin page: restricted-search
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Nov 28, 2016
  • Latest release: Dec 1, 2016
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: prabhakar.umpl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,120 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.78ms] Passed 4 tests

This is a short check of server-side resources used by Restricted Search
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0134.56 ▼4.53
Dashboard /wp-admin3.33 ▼0.0243.92 ▼12.22
Posts /wp-admin/edit.php3.38 ▲0.0242.99 ▼5.37
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.45 ▼9.00
Media Library /wp-admin/upload.php3.25 ▲0.0235.06 ▲0.82

Server storage [IO: ▲0.31MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Restricted Search
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.35 ▼0.211.72 ▲0.2941.75 ▼2.28
Dashboard /wp-admin2,210 ▲305.57 ▼0.1181.34 ▼8.9766.38 ▲20.44
Posts /wp-admin/edit.php2,112 ▲121.99 ▼0.0535.16 ▲0.3434.94 ▼6.62
Add New Post /wp-admin/post-new.php1,693 ▲16521.94 ▼1.25690.29 ▲42.8352.29 ▼15.92
Media Library /wp-admin/upload.php1,418 ▲244.22 ▼0.1699.91 ▲3.4971.90 ▲30.95

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes: You can look at the official readme.txt

restricted-search/restricted_search.php 92% from 13 tests

"Restricted Search" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("restricted-search.php" instead of "restricted_search.php")

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
Good job! No executable or dangerous file extensions detected3,490 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
CSS53652162,193
PHP112892441,048
JavaScript4222174
PO File1303175

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity32.25
▷ Minimum class complexity2.00
▷ Maximum class complexity173.00
Average method complexity5.10
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods61
▷ Static methods11.64%
▷ Public methods61100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
14 PNG files occupy 0.12MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/vtdlogo-2x.png3.56KB2.06KB▼ 42.10%
assets/images/vtdesigns.png1.50KB0.71KB▼ 52.99%
lib/jquery/upload/images/Placeholderpdf.png14.58KB5.45KB▼ 62.63%
(invalid) assets/images/question_mark.png0.86KB0.00KB▼ 100.00%
assets/images/fpd/grid.png2.69KB0.13KB▼ 95.17%