84% search-by-post-id

Code Review | Search by Post ID

WordPress plugin Search by Post ID scored84%from 54 tests.

About plugin

  • Plugin page: search-by-post-id
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3
  • WordPress version: 6.3.1
  • First release: Jul 26, 2019
  • Latest release: Nov 19, 2019
  • Number of updates: 10
  • Update frequency: every 12.0 days
  • Top authors: rezendemarcos (80%)rezehnde (30%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /905 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Search by Post ID
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.53 ▼2.66
Dashboard /wp-admin3.31 ▲0.0149.89 ▼4.55
Posts /wp-admin/edit.php3.36 ▲0.0148.39 ▼2.37
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.75 ▼23.64
Media Library /wp-admin/upload.php3.24 ▲0.0136.66 ▲1.49

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Search by Post ID
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.05 ▼0.531.76 ▲0.0944.53 ▲1.24
Dashboard /wp-admin2,195 ▲185.63 ▼0.0093.56 ▼1.8241.72 ▼2.35
Posts /wp-admin/edit.php2,100 ▼32.01 ▼0.0337.02 ▲0.8434.94 ▲0.43
Add New Post /wp-admin/post-new.php1,526 ▼223.30 ▲0.18660.34 ▼17.8847.72 ▼9.31
Media Library /wp-admin/upload.php1,400 ▼04.20 ▲0.0998.31 ▼19.6743.24 ▼3.64

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/search-by-post-id/search-by-post-id.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: id, custom post types, media, pages, admin...

search-by-post-id/search-by-post-id.php 92% from 13 tests

The main file in "Search by Post ID" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 153 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin31 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16731

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.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

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