94% pagenator

Code Review | Pagenator

WordPress plugin Pagenator scored 94% from 54 tests.

About plugin

  • Plugin page: pagenator
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5
  • WordPress version: 5.8.1
  • First release: Nov 22, 2014
  • Latest release: Nov 22, 2014
  • Number of updates: 9
  • Update frequency: N/A
  • Top authors: NullLogic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 905 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼144.01ms] Passed 4 tests

An overview of server-side resources used by Pagenator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1335.05 ▲10.40
Dashboard /wp-admin3.06 ▲0.0152.36 ▲4.43
Posts /wp-admin/edit.php3.12 ▲0.0142.49 ▲0.27
Add New Post /wp-admin/post-new.php5.43 ▲0.0091.77 ▼573.34
Media Library /wp-admin/upload.php3.01 ▼0.0028.53 ▼7.41

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Pagenator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,788 ▲19216.25 ▲0.7011.91 ▲2.2951.47 ▲4.32
Dashboard /wp-admin2,966 ▲356.07 ▼0.08164.27 ▲24.42113.84 ▼2.88
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0062.33 ▼4.9789.38 ▲2.63
Add New Post /wp-admin/post-new.php1,500 ▼17618.48 ▼0.33360.11 ▼21.54106.43 ▼2.30
Media Library /wp-admin/upload.php1,807 ▼05.02 ▲0.00145.44 ▼8.10125.03 ▲3.03

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 smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_singular() in wp-content/plugins/pagenator/public/views/pager.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: paginator, pagenator

pagenator/pagenator.php Passed 13 tests

"Pagenator" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
50 characters long description:
Pagenator adds after content next & prev buttons .

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin152 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP567103115
CSS18032
JavaScript1415

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.20
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods330.00%
▷ Public methods990.00%
▷ Protected methods00.00%
▷ Private methods110.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/assets/img/next_button.png2.58KB1.65KB▼ 36.15%
public/assets/img/previous_button.png3.05KB2.00KB▼ 34.34%