79% tw-pagination

Code Review | TW Pagination

WordPress plugin TW Pagination scored79%from 54 tests.

About plugin

  • Plugin page: tw-pagination
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 21, 2012
  • Latest release: Mar 31, 2015
  • Number of updates: 5
  • Update frequency: every 172.0 days
  • Top authors: tweetysha (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /23,329 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.12ms] Passed 4 tests

A check of server-side resources used by TW Pagination
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.62 ▼8.27
Dashboard /wp-admin3.37 ▲0.0746.29 ▼6.20
Posts /wp-admin/edit.php3.42 ▲0.0752.71 ▼0.39
Add New Post /wp-admin/post-new.php5.95 ▲0.0795.56 ▲0.54
Media Library /wp-admin/upload.php3.29 ▲0.0640.53 ▼5.63

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
tw_pagination_options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

TW Pagination: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲914.13 ▼0.141.92 ▼0.4942.19 ▼1.06
Dashboard /wp-admin2,199 ▲225.65 ▲0.0794.80 ▼2.6843.99 ▲1.58
Posts /wp-admin/edit.php2,107 ▲42.01 ▼0.0139.70 ▼0.3437.54 ▲0.31
Add New Post /wp-admin/post-new.php1,533 ▲723.44 ▲0.27711.10 ▼16.3361.92 ▲2.09
Media Library /wp-admin/upload.php1,404 ▲44.41 ▲0.25107.63 ▼1.2147.60 ▼3.57
TW Pagination /wp-admin/tw-pagination.php260.420.1114.36

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • tw_pagination_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/tw-pagination/tw-pagination.php:14

User-side errors 0% from 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
There were not plugin tags detected

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

The main PHP script in "TW Pagination" version 1.1 is automatically included on every request by WordPress
73 characters long description:
A simple and flexible pagination plugin for WordPress posts and comments.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected354 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14656275
CSS1221279

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity47.00
▷ Minimum class complexity47.00
▷ Maximum class complexity47.00
Average method complexity6.11
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin