73% curated-search

Code Review | Curated Search

WordPress plugin Curated Search scored73%from 54 tests.

About plugin

  • Plugin page: curated-search
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3
  • WordPress version: 6.3.1
  • First release: May 28, 2015
  • Latest release: Aug 18, 2015
  • Number of updates: 9
  • Update frequency: every 9.1 days
  • Top authors: fattymembrane (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /2,750 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼0.56ms] Passed 4 tests

An overview of server-side resources used by Curated Search
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0642.65 ▲0.44
Dashboard /wp-admin3.38 ▲0.0857.75 ▲4.44
Posts /wp-admin/edit.php3.50 ▲0.1452.67 ▲3.28
Add New Post /wp-admin/post-new.php5.99 ▲0.1089.99 ▼10.39
Media Library /wp-admin/upload.php3.30 ▲0.0738.13 ▲4.99
Special Searches /wp-admin/edit.php?post_type=special-search3.3537.67
Settings /wp-admin/edit.php?post_type=special-search&page=curated-search3.2736.71
Add New /wp-admin/post-new.php?post_type=special-search3.4350.59

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: 1 new table, 8 new options
New tables
wp_cs_excluded_list
New WordPress options
widget_recent-posts
cs_search_pagination
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
cs_one_result_redirect
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Curated Search
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲4714.38 ▲0.031.72 ▼0.5443.41 ▲0.27
Dashboard /wp-admin2,242 ▲625.64 ▼0.0187.63 ▼2.3339.26 ▼2.99
Posts /wp-admin/edit.php2,148 ▲452.24 ▲0.2435.39 ▼1.9633.37 ▼7.25
Add New Post /wp-admin/post-new.php1,551 ▲2519.56 ▼3.64651.86 ▼2.7953.87 ▲1.13
Media Library /wp-admin/upload.php1,444 ▲474.27 ▲0.0795.66 ▼12.2443.38 ▼4.27
Special Searches /wp-admin/edit.php?post_type=special-search1,1442.1734.8131.96
Settings /wp-admin/edit.php?post_type=special-search&page=curated-search1,0511.9234.3028.73
Add New /wp-admin/post-new.php?post_type=special-search2,4337.99174.0371.08

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_cs_excluded_list
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • cs_one_result_redirect
    • db_upgraded
    • cs_search_pagination

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=special-search&page=curated-search
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/curated-search/includes/class-cs-ajax.php+75
    Trying to get property 'taxonomy' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=special-search&page=curated-search
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/curated-search/includes/class-cs-ajax.php+75
    Trying to get property 'term_id' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=special-search&page=curated-search
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/curated-search/includes/class-cs-ajax.php+75
    Undefined offset: 1
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=special-search&page=curated-search
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/curated-search/includes/class-cs-ajax.php+75
    Trying to get property 'name' of non-object

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

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === curated-search === )
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt might help

curated-search/curated-search.php Passed 13 tests

The principal PHP file in "Curated Search" v. 1.2 is loaded by WordPress automatically on each request
89 characters long description:
Quickly and easily specify the content you want users to see for specific search queries.

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
Success! There were no dangerous files found in this plugin1,205 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP91732821,017
JavaScript1211172
CSS119316

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity17.40
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity3.28
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods36
▷ Static methods12.78%
▷ Public methods3494.44%
▷ Protected methods00.00%
▷ Private methods25.56%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.51MB with 0.37MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-5.png80.34KB22.63KB▼ 71.83%
assets/screenshot-1.png125.14KB35.02KB▼ 72.01%
assets/screenshot-2.png135.11KB40.53KB▼ 70.00%
assets/screenshot-4.png81.03KB22.62KB▼ 72.08%
assets/screenshot-3.png104.05KB27.80KB▼ 73.28%