79% date-range-filter

Code Review | Date Range Filter

WordPress plugin Date Range Filter scored 79% from 54 tests.

About plugin

  • Plugin page: date-range-filter
  • Plugin version: 0.0.11
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.7.1
  • WordPress version: 6.3.1
  • First release: Oct 23, 2014
  • Latest release: Jan 24, 2017
  • Number of updates: 21
  • Update frequency: every 39.4 days
  • Top authors: jonathanbardo (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

700+ active / 7,481 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.13MB] [CPU: ▼9.77ms] Passed 4 tests

An overview of server-side resources used by Date Range Filter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1035.71 ▼6.18
Dashboard /wp-admin3.54 ▲0.2430.14 ▼16.88
Posts /wp-admin/edit.php3.77 ▲0.4241.08 ▼2.34
Add New Post /wp-admin/post-new.php5.98 ▲0.0984.68 ▼13.69
Media Library /wp-admin/upload.php3.32 ▲0.0939.32 ▲8.23

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
dashboard_widget_options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Date Range Filter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,009 ▲27413.65 ▲0.481.64 ▼3.1129.99 ▼18.59
Dashboard /wp-admin2,415 ▲2274.87 ▼0.15110.37 ▼3.3646.29 ▲4.40
Posts /wp-admin/edit.php2,203 ▲1142.30 ▲0.1541.19 ▲4.4130.72 ▼5.80
Add New Post /wp-admin/post-new.php1,534 ▲423.45 ▲5.23663.97 ▲45.3151.96 ▲3.87
Media Library /wp-admin/upload.php1,394 ▲64.25 ▲0.0794.60 ▼5.9839.87 ▼5.50

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • dashboard_widget_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/date-range-filter/includes/dashboard/widget.php
  • 5× 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/date-range-filter/date-range-filter.php:565
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_types() in wp-content/plugins/date-range-filter/includes/dashboard/config.php:4
    • > PHP Notice
      Undefined variable: output in wp-content/plugins/date-range-filter/includes/dashboard/widget.php on line 5
    • > PHP Warning
      Declaration of Carbon\\Carbon::setTime($hour, $minute, $second = 0) should be compatible with DateTime::setTime($hour, $minute, $second = NULL, $microseconds = NULL) in wp-content/plugins/date-range-filter/includes/vendor/Carbon.php on line 653
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/date-range-filter/includes/dashboard/widget.php on line 5

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 Passed 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
6 plugin tags: dashboard, filter, date, widget, admin...

date-range-filter/date-range-filter.php Passed 13 tests

The entry point to "Date Range Filter" version 0.0.11 is a PHP file that has certain tags in its header comment area
75 characters long description:
Easily filter the admin list of post and custom post type with a date range

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
No dangerous file extensions were detected2,447 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP63791,1931,610
CSS48340352
Bourne Again Shell24525193
JavaScript2266136
Markdown3500107
YAML26043
XML1306

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity59.67
▷ Minimum class complexity38.00
▷ Maximum class complexity93.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods150
▷ Static methods3120.67%
▷ Public methods14898.67%
▷ Protected methods21.33%
▷ Private methods00.00%
Functions5
▷ Named functions00.00%
▷ Anonymous functions5100.00%
Constants19
▷ Global constants315.79%
▷ Class constants1684.21%
▷ Public constants16100.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.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/datepicker-icons.png6.15KB4.17KB▼ 32.13%
images/datepicker-icons-gray.png8.33KB4.17KB▼ 49.88%