90% post-search-and-order

Code Review | post search and order

WordPress plugin post search and order scored90%from 54 tests.

About plugin

  • Plugin page: post-search-and-o...
  • Plugin version: 1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7.2
  • WordPress version: 6.3.1
  • First release: Jul 16, 2021
  • Latest release: Jul 17, 2021
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: yukimichi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /333 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

Analyzing server-side resources used by post search and order
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0340.09 ▼5.60
Dashboard /wp-admin3.32 ▼0.0249.26 ▼20.31
Posts /wp-admin/edit.php3.38 ▲0.0248.13 ▲0.03
Add New Post /wp-admin/post-new.php5.90 ▲0.0296.96 ▲4.49
Media Library /wp-admin/upload.php3.25 ▲0.0236.67 ▼0.03
post search and order /wp-admin/options-general.php?page=post_search_and_order_setting3.2131.39

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

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

Browser metrics Passed 4 tests

post search and order: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,907 ▲14613.80 ▼0.5812.53 ▲10.6945.40 ▲2.51
Dashboard /wp-admin2,196 ▲195.51 ▼0.1781.05 ▼18.3642.74 ▲0.54
Posts /wp-admin/edit.php2,104 ▲11.99 ▼0.0239.50 ▲1.0434.92 ▲1.22
Add New Post /wp-admin/post-new.php1,548 ▲323.28 ▲0.13671.62 ▼49.0754.76 ▲1.26
Media Library /wp-admin/upload.php1,404 ▲74.22 ▲0.1194.68 ▼25.2940.35 ▼10.60
post search and order /wp-admin/options-general.php?page=post_search_and_order_setting8862.0622.9958.95

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

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 no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
7 plugin tags: customfield, sort, filter, period, order...

post-search-and-order/psao.php 92% from 13 tests

The principal PHP file in "post search and order" v. 1.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("post-search-and-order.php" instead of "psao.php")

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
Good job! No executable or dangerous file extensions detected20,341 lines of code in 224 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1744,1581,08616,950
PHP201542141,406
Markdown62040637
Sass1216910614
CSS37112486
YAML566129
JSON400119

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions37
▷ Named functions3183.78%
▷ Anonymous functions616.22%
Constants2
▷ Global constants2100.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 are no PNG files in this plugin