78% wp-paginate

Code Review | WP-Paginate

WordPress plugin WP-Paginate scored78%from 54 tests.

About plugin

  • Plugin page: wp-paginate
  • Plugin version: 2.2.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 4, 2009
  • Latest release: Nov 8, 2023
  • Number of updates: 99
  • Update frequency: every 52.3 days
  • Top authors: AlanP57 (61.62%)emartin24 (39.39%)

Code review

54 tests

User reviews

101 reviews

Install metrics

30,000+ active /929,835 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.23MB] [CPU: ▼4.58ms] Passed 4 tests

Analyzing server-side resources used by WP-Paginate
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2340.04 ▲0.02
Dashboard /wp-admin3.53 ▲0.2245.95 ▼5.26
Posts /wp-admin/edit.php3.64 ▲0.2848.04 ▼1.45
Add New Post /wp-admin/post-new.php6.13 ▲0.2491.20 ▼11.63
Media Library /wp-admin/upload.php3.45 ▲0.2233.66 ▲0.13

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 30 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
wp_paginate_options
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP-Paginate
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲4114.69 ▲0.351.80 ▲0.0541.50 ▲3.59
Dashboard /wp-admin2,206 ▲255.62 ▼0.0592.37 ▼14.9639.87 ▼4.45
Posts /wp-admin/edit.php2,111 ▲82.00 ▲0.0239.71 ▼4.4935.60 ▲2.45
Add New Post /wp-admin/post-new.php1,547 ▲2125.42 ▲2.20615.60 ▼67.7964.48 ▲4.58
Media Library /wp-admin/upload.php1,414 ▲144.18 ▼0.0396.89 ▼11.1142.12 ▲0.03
WP-Paginate /wp-admin/wp-paginate.php260.410.1413.76

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • wp_paginate_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-paginate/wp-paginate.php:50

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/wp-paginate.php
    • > Network (severe)
    wp-admin/wp-paginate.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Requires at least: Invalid plugin version format
You can look at the official readme.txt

wp-paginate/wp-paginate.php 92% from 13 tests

"WP-Paginate" version 2.2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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 plugin9,129 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript28939237,329
PHP1185991,004
CSS48740533
PO File1102107263

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity207.00
▷ Minimum class complexity207.00
▷ Maximum class complexity207.00
Average method complexity8.63
▷ Minimum method complexity1.00
▷ Maximum method complexity74.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
13 PNG files occupy 0.94MB with 0.62MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png48.80KB19.18KB▼ 60.69%
images/wppp-buttons.png218.01KB63.17KB▼ 71.03%
images/MG_logo.png10.15KB4.42KB▼ 56.49%
images/buy-now-btn.png6.51KB1.80KB▼ 72.37%
screenshot-2.png310.15KB92.54KB▼ 70.16%