94% ry-custom-pagination

Code Review | RY Custom Pagination

WordPress plugin RY Custom Pagination scored 94% from 54 tests.

About plugin

  • Plugin page: ry-custom-pagination
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.3.1
  • WordPress version: 5.9.2
  • First release: Dec 1, 2015
  • Latest release: Dec 3, 2015
  • Number of updates: 9
  • Update frequency: every 0.2 days
  • Top authors: fantasyworld (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 539 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼292.29ms] Passed 4 tests

An overview of server-side resources used by RY Custom Pagination
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0155.99 ▲5.06
Dashboard /wp-admin3.41 ▲0.0131.80 ▼0.97
Posts /wp-admin/edit.php3.65 ▲0.0135.88 ▼2.40
Add New Post /wp-admin/post-new.php6.88 ▼0.0988.48 ▼1,156.83
Media Library /wp-admin/upload.php3.30 ▲0.0023.96 ▼8.94

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for RY Custom Pagination
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲515.92 ▲0.235.43 ▼1.322.42 ▼0.19
Dashboard /wp-admin2,895 ▲416.18 ▼0.12115.64 ▼19.50156.96 ▼6.60
Posts /wp-admin/edit.php2,691 ▼33.23 ▲0.0067.86 ▲5.83149.06 ▲6.77
Add New Post /wp-admin/post-new.php1,661 ▼516.03 ▼5.91416.45 ▼17.17150.34 ▼7.25
Media Library /wp-admin/upload.php1,698 ▲45.51 ▲0.06146.70 ▼109.34188.51 ▼6.95

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ry-custom-pagination/class.ry-cp.admin.php
    • > /wp-content/plugins/ry-custom-pagination/class.ry-cp.php
    • > /wp-content/plugins/ry-custom-pagination/class.ry-cp.update.php
    • > /wp-content/plugins/ry-custom-pagination/ry-custom-pagination.php

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)
No browser errors were detected

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
3 plugin tags: post, post pagination, link

ry-custom-pagination/ry-custom-pagination.php Passed 13 tests

The main PHP script in "RY Custom Pagination" version 1.0.4 is automatically included on every request by WordPress
17 characters long description:
Custom Pagination

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected310 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP43710310

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity12.00
▷ Minimum class complexity2.00
▷ Maximum class complexity26.00
Average method complexity5.12
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods8
▷ Static methods8100.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
PNG images were not found in this plugin