84% date-query-enabler

Code Review | date_query enabler

WordPress plugin date_query enabler scored 84% from 54 tests.

About plugin

  • Plugin page: date-query-enabler
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 1, 2016
  • Latest release: Feb 28, 2016
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: arikogan (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 918 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.76ms] Passed 4 tests

A check of server-side resources used by date_query enabler
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.65 ▼1.50
Dashboard /wp-admin3.31 ▲0.0147.04 ▲0.09
Posts /wp-admin/edit.php3.36 ▲0.0044.86 ▼4.24
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.55 ▼17.39
Media Library /wp-admin/upload.php3.23 ▲0.0038.16 ▲2.11

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by date_query enabler
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4314.48 ▲0.081.82 ▼0.5044.61 ▼3.64
Dashboard /wp-admin2,206 ▲215.82 ▲0.92111.30 ▲3.8144.68 ▼0.46
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0434.69 ▼9.1440.27 ▲5.42
Add New Post /wp-admin/post-new.php1,517 ▼1617.73 ▼5.38643.28 ▼46.5658.31 ▼13.52
Media Library /wp-admin/upload.php1,388 ▼34.29 ▲0.1096.87 ▼5.6344.53 ▲0.26

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/date-query-enabler/date_query.php:18

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, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === date-query-enabler === )
Please take inspiration from this readme.txt

date-query-enabler/date_query.php 92% from 13 tests

The main PHP file in "date_query enabler" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("date-query-enabler.php" instead of "date_query.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected8 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1398

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected