84% post-search-ajax

Code Review | Post Search Ajax

WordPress plugin Post Search Ajax scored84%from 54 tests.

About plugin

  • Plugin page: post-search-ajax
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.9
  • WordPress version: 6.3.1
  • First release: Aug 10, 2017
  • Latest release: Nov 9, 2017
  • Number of updates: 14
  • Update frequency: every 6.6 days
  • Top authors: hashsalacop (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /735 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼8.49ms] Passed 4 tests

A check of server-side resources used by Post Search Ajax
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.20 ▲0.66
Dashboard /wp-admin3.31 ▼0.0347.14 ▼15.65
Posts /wp-admin/edit.php3.36 ▲0.0145.13 ▼0.79
Add New Post /wp-admin/post-new.php5.89 ▲0.0178.45 ▼16.08
Media Library /wp-admin/upload.php3.23 ▲0.0133.20 ▼1.42

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Post Search Ajax
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,901 ▲15513.53 ▼0.608.68 ▲6.9542.34 ▲2.04
Dashboard /wp-admin2,227 ▲364.85 ▼1.0797.41 ▼10.3639.98 ▲0.91
Posts /wp-admin/edit.php2,107 ▲182.01 ▲0.0239.73 ▲3.4436.94 ▲2.58
Add New Post /wp-admin/post-new.php1,539 ▲623.12 ▲0.04582.68 ▼100.7251.53 ▼12.11
Media Library /wp-admin/upload.php1,409 ▲214.19 ▲0.0197.13 ▼4.9941.55 ▲1.06

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

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

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)
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
Please fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-search-ajax/inc/psa_enqueue.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-search-ajax/inc/psa_enqueue.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-search-ajax/inc/psa_admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/post-search-ajax/inc/psa_function.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: post, search, ajax

post-search-ajax/main.php 85% from 13 tests

The entry point to "Post Search Ajax" version 1.0.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("post-search-ajax.php" instead of "main.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin236 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP4191290
CSS24178
SVG10049
JavaScript13219

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin