78% wp-jquery-pdf-paged

Code Review | WP jQuery Pager

WordPress plugin WP jQuery Pager scored78%from 54 tests.

About plugin

  • Plugin page: wp-jquery-pdf-paged
  • Plugin version: 1.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 6.3.1
  • First release: Jun 10, 2012
  • Latest release: Feb 23, 2013
  • Number of updates: 9
  • Update frequency: every 28.8 days
  • Top authors: ivycat (66.67%)sewmyheadon (33.33%)dgilfoy (22.22%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /13,242 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.63ms] Passed 4 tests

This is a short check of server-side resources used by WP jQuery Pager
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.87 ▼0.35
Dashboard /wp-admin3.32 ▲0.0246.12 ▼0.37
Posts /wp-admin/edit.php3.37 ▲0.0145.35 ▼2.91
Add New Post /wp-admin/post-new.php5.90 ▲0.0197.71 ▼1.70
Media Library /wp-admin/upload.php3.24 ▲0.0136.16 ▼1.55

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP jQuery Pager
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.74 ▲0.371.94 ▲0.1844.27 ▲2.59
Dashboard /wp-admin2,206 ▲635.83 ▲0.1897.10 ▼1.9038.17 ▼5.83
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0038.51 ▲0.7834.48 ▲0.33
Add New Post /wp-admin/post-new.php1,542 ▲1418.42 ▲0.27646.70 ▼7.6356.22 ▼8.71
Media Library /wp-admin/upload.php1,388 ▼34.22 ▲0.05107.47 ▲4.6447.09 ▲0.45

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-jquery-pdf-paged/assets/views/output-view.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: imgs in wp-content/plugins/wp-jquery-pdf-paged/assets/views/output-view.php on line 7
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wp-jquery-pdf-paged/assets/views/output-view.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/wp-jquery-pdf-paged/wp-jquery-paged.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 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
8 plugin tags: image, book, gallery, pager, magazine...

wp-jquery-pdf-paged/wp-jquery-paged.php 92% from 13 tests

"WP jQuery Pager" version 1.4.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-jquery-pdf-paged.php" instead of "wp-jquery-paged.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin454 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS16715322
PHP2182370
JavaScript2115062

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for 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.22
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods240.00%
▷ Protected methods360.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/button.png8.68KB3.29KB▼ 62.07%