84% wp-rest-api-filter-posts-date-wise-using-given-column

Code Review | WP REST API - Filter posts date wise using given column

WordPress plugin WP REST API - Filter posts date wise using given column scored84%from 54 tests.

About plugin

  • Plugin page: wp-rest-api-filte...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.8.3
  • WordPress version: 6.3.1
  • First release: Nov 9, 2017
  • Latest release: Nov 9, 2017
  • Number of updates: 7
  • Update frequency: N/A
  • Top authors: vigneshsundar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /983 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: ▼7.41ms] Passed 4 tests

A check of server-side resources used by WP REST API - Filter posts date wise using given column
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.79 ▼5.41
Dashboard /wp-admin3.32 ▲0.0150.26 ▼9.75
Posts /wp-admin/edit.php3.37 ▲0.0153.01 ▲1.36
Add New Post /wp-admin/post-new.php5.93 ▲0.0389.43 ▼7.71
Media Library /wp-admin/upload.php3.24 ▲0.0135.94 ▼6.78

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

WP REST API - Filter posts date wise using given column: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.25 ▼0.311.90 ▲0.1243.12 ▼2.66
Dashboard /wp-admin2,198 ▲185.64 ▼0.0290.10 ▼9.2238.55 ▼5.47
Posts /wp-admin/edit.php2,100 ▲32.02 ▲0.0240.23 ▲3.8534.58 ▼4.46
Add New Post /wp-admin/post-new.php1,526 ▼223.32 ▲0.37687.23 ▲9.8353.64 ▼10.13
Media Library /wp-admin/upload.php1,403 ▲34.27 ▲0.09105.21 ▲8.1344.02 ▼1.69

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× 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/wp-rest-api-filter-posts-date-wise-using-given-column/filter_post_using_date_query_column.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: wordpress rest api, filters, wordpress api, filter modified posts, post filter

wp-rest-api-filter-posts-date-wise-using-given-column/filter_post_using_date_query_column.php 85% from 13 tests

Analyzing the main PHP file in "WP REST API - Filter posts date wise using given column" version 0.1
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 ("wp-rest-api-filter-posts-date-wise-using-given-column.php" instead of "filter_post_using_date_query_column.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 299 characters long)

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
No dangerous file extensions were detected23 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP162623

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.50
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%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png5.84KB3.05KB▼ 47.89%
assets/icon-128x128.png2.83KB1.75KB▼ 38.09%