84% post-search

Code Review | Post Search

WordPress plugin Post Search scored84%from 54 tests.

About plugin

  • Plugin page: post-search
  • Plugin version: 1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 19, 2020
  • Latest release: Jun 19, 2020
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: sakawsar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /351 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.92ms] Passed 4 tests

A check of server-side resources used by Post Search
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.30 ▼2.01
Dashboard /wp-admin3.33 ▲0.0248.23 ▼0.66
Posts /wp-admin/edit.php3.38 ▲0.0250.44 ▲0.67
Add New Post /wp-admin/post-new.php5.91 ▲0.0296.50 ▼5.67
Media Library /wp-admin/upload.php3.25 ▲0.0240.90 ▲7.39

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Post Search
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8114.48 ▲0.192.01 ▲0.0941.92 ▼1.39
Dashboard /wp-admin2,206 ▲184.85 ▼0.06107.57 ▲3.3841.68 ▼1.36
Posts /wp-admin/edit.php2,089 ▼32.01 ▲0.0239.09 ▼1.4735.75 ▼5.67
Add New Post /wp-admin/post-new.php1,542 ▲2818.21 ▲0.72606.49 ▼87.1449.20 ▼3.78
Media Library /wp-admin/upload.php1,382 ▼94.24 ▲0.0797.98 ▼1.1543.93 ▼1.90

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/post-search/index.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === post-search === )
You can look at the official readme.txt

post-search/index.php 92% from 13 tests

The principal PHP file in "Post Search" v. 1.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("post-search.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin145 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP167145

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin