84% wp-date-range

Code Review | wp date range

WordPress plugin wp date range scored84%from 54 tests.

About plugin

  • Plugin page: wp-date-range
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.0
  • WordPress version: 6.3.1
  • First release: Feb 23, 2013
  • Latest release: Sep 8, 2014
  • Number of updates: 17
  • Update frequency: every 32.4 days
  • Top authors: sevy29 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /2,029 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.86MB] [CPU: ▼15.66ms] Passed 4 tests

This is a short check of server-side resources used by wp date range
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.78 ▼0.6816.15 ▼17.21
Dashboard /wp-admin3.32 ▲0.0245.58 ▲0.01
Posts /wp-admin/edit.php3.37 ▲0.0245.98 ▲5.50
Add New Post /wp-admin/post-new.php3.11 ▼2.7845.00 ▼45.74
Media Library /wp-admin/upload.php3.25 ▲0.0235.31 ▲0.32
Date range settings /wp-admin/options-general.php?page=date_range_setting3.2830.58

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for wp date range
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲7514.88 ▲0.241.82 ▼0.1943.82 ▲3.03
Dashboard /wp-admin2,227 ▲355.85 ▲0.91105.06 ▲1.6238.29 ▲1.18
Posts /wp-admin/edit.php2,110 ▲212.90 ▲0.8949.10 ▲11.0038.11 ▲4.89
Add New Post /wp-admin/post-new.php1,542 ▼018.33 ▲0.15625.13 ▲8.6461.34 ▲8.44
Media Library /wp-admin/upload.php1,406 ▲184.84 ▲0.55112.15 ▲13.4742.24 ▲0.02
Date range settings /wp-admin/options-general.php?page=date_range_setting1,2012.9936.1027.03

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-date-range/meta-box-panel.php:4
    • > PHP Warning
      Use of undefined constant DATE_RANGE_FROM - assumed 'DATE_RANGE_FROM' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-date-range/meta-box-panel.php on line 4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-date-range/admin-panel.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: localize, date, datepicker, calendar, range

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

The main PHP script in "wp date range" version 1.2 is automatically included on every request by WordPress
10 characters long description:
Date range

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin3,347 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript572712,503
PHP320329507
CSS22567297
PO File113540

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.31
Average class complexity42.00
▷ Minimum class complexity42.00
▷ Maximum class complexity42.00
Average method complexity3.16
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
16 PNG files occupy 0.06MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png20.65KB8.66KB▼ 58.08%
css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
css/smoothness/images/ui-icons.png4.27KB4.11KB▼ 3.78%
css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%