79% wp-lopa

Code Review | Logarithmic Pagination

WordPress plugin Logarithmic Pagination scored79%from 54 tests.

About plugin

  • Plugin page: wp-lopa
  • Plugin version: 0.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Apr 21, 2013
  • Latest release: Apr 22, 2013
  • Number of updates: 27
  • Update frequency: every 0.0 days
  • Top authors: uargh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,670 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
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.32ms] Passed 4 tests

Server-side resources used by Logarithmic Pagination
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.61 ▼0.49
Dashboard /wp-admin3.36 ▲0.0251.28 ▼14.68
Posts /wp-admin/edit.php3.41 ▲0.0657.17 ▲6.89
Add New Post /wp-admin/post-new.php5.94 ▲0.0693.60 ▼7.75
Media Library /wp-admin/upload.php3.28 ▲0.0638.51 ▲1.66
Log. Pagination /wp-admin/options-general.php?page=wp_lopa3.2330.37

Server storage [IO: ▲0.05MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 13 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
lopa_show_css
lopa_prev_text
lopa_before_id
lopa_after_id
lopa_show_links
widget_recent-posts
...

Browser metrics Passed 4 tests

Logarithmic Pagination: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲3313.29 ▼0.921.67 ▼0.2742.93 ▲1.15
Dashboard /wp-admin2,225 ▲254.80 ▼1.05111.28 ▲8.9742.28 ▲0.79
Posts /wp-admin/edit.php2,107 ▲42.04 ▼0.0039.78 ▼0.2834.75 ▼3.12
Add New Post /wp-admin/post-new.php1,548 ▲2223.29 ▲5.66601.29 ▼74.8350.63 ▼8.88
Media Library /wp-admin/upload.php1,404 ▲44.25 ▲0.0497.09 ▼4.2348.89 ▲3.84
Log. Pagination /wp-admin/options-general.php?page=wp_lopa1,1152.0326.8729.42

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wp_lopa
    • > Notice in wp-content/plugins/wp-lopa/inc/settings.php+101
    Undefined index: lopa_settings_page
    • > GET request to /wp-admin/options-general.php?page=wp_lopa
    • > Notice in wp-content/plugins/wp-lopa/inc/settings.php+117
    Undefined index: lopa_settings_page_delete

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
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-lopa/wp-lopa.php
    • > /wp-content/plugins/wp-lopa/inc/pagination.php
    • > /wp-content/plugins/wp-lopa/inc/settings.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)
Everything seems fine on the user side

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
7 plugin tags: navigation, archives, pages, search, tags...

wp-lopa/wp-lopa.php Passed 13 tests

The primary PHP file in "Logarithmic Pagination" version 0.1.3 is used by WordPress to initiate all plugin functionality
62 characters long description:
Plugin that inserts logarithmic pagination into archive pages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected694 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP47450397
PO File2114122297

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.51
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected