84% date-pagination

Code Review | Date Pagination

WordPress plugin Date Pagination scored84%from 54 tests.

About plugin

  • Plugin page: date-pagination
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 6.3.1
  • First release: Feb 1, 2017
  • Latest release: Aug 28, 2020
  • Number of updates: 10
  • Update frequency: every 130.1 days
  • Top authors: keesiemeijer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,395 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Date Pagination
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.46 ▲2.63
Dashboard /wp-admin3.31 ▼0.0442.21 ▼14.83
Posts /wp-admin/edit.php3.36 ▲0.0044.63 ▼2.23
Add New Post /wp-admin/post-new.php5.89 ▲0.0077.67 ▼25.19
Media Library /wp-admin/upload.php3.23 ▲0.0033.75 ▲0.29

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Date Pagination
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.42 ▲0.071.73 ▼0.1644.10 ▲2.96
Dashboard /wp-admin2,192 ▲155.50 ▼0.1483.15 ▼7.2238.12 ▼4.51
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0734.73 ▼6.3937.59 ▲0.01
Add New Post /wp-admin/post-new.php1,526 ▼023.20 ▲0.08665.75 ▼30.8350.13 ▼10.10
Media Library /wp-admin/upload.php1,403 ▲34.27 ▲0.0995.12 ▼5.1540.48 ▼6.20

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/date-pagination/date-pagination.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/date-pagination/src/query.php:9

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: yearly, monthly, date, paginate, daily...

date-pagination/date-pagination.php Passed 13 tests

The main PHP file in "Date Pagination" ver. 2.0.0 adds more information about the plugin and also serves as the entry point for this plugin
75 characters long description:
WordPress theme template functions to paginate posts by year, month or day.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected340 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP4108315340

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.56
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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin