62% page-links-single-page-option

Code Review | WordPress Pagination Plugin: Page-Links Plus

WordPress plugin WordPress Pagination Plugin: Page-Links Plus scored62%from 54 tests.

About plugin

  • Plugin page: page-links-single...
  • Plugin version: 2.5.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.4
  • WordPress version: 6.3.1
  • First release: Feb 29, 2012
  • Latest release: Apr 3, 2020
  • Number of updates: 279
  • Update frequency: every 10.6 days
  • Top authors: studiohyperset (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

300+ active /46,431 total downloads

Benchmarks

Plugin footprint 65% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.89MB] [CPU: ▼38.81ms] Passed 4 tests

Analyzing server-side resources used by WordPress Pagination Plugin: Page-Links Plus
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.08 ▼0.3918.26 ▼20.75
Dashboard /wp-admin3.13 ▼0.1820.59 ▼26.34
Posts /wp-admin/edit.php3.13 ▼0.2320.97 ▼24.34
Add New Post /wp-admin/post-new.php3.13 ▼2.7619.07 ▼83.79
Media Library /wp-admin/upload.php3.13 ▼0.1116.95 ▼20.09
Single Page /wp-admin/admin.php?page=sh-page-links-options3.1318.80

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 45 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WordPress Pagination Plugin: Page-Links Plus
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲7013.18 ▼1.191.86 ▲0.0742.96 ▲2.37
Dashboard /wp-admin2,245 ▲535.86 ▲0.90111.61 ▲1.7772.96 ▲32.31
Posts /wp-admin/edit.php2,125 ▲362.02 ▲0.0137.89 ▲3.7635.17 ▼1.14
Add New Post /wp-admin/post-new.php6,281 ▲4,76226.08 ▲3.04905.33 ▲229.2361.46 ▲5.45
Media Library /wp-admin/upload.php1,421 ▲364.14 ▼0.0498.25 ▼2.4845.01 ▲1.58
Scrolling Pagination /wp-admin/admin.php?page=sh-page-links-options#scrolling_pagination1,6032.5141.3484.11
Pagination Controls /wp-admin/admin.php?page=sh-page-links-options#pagination_styles1,6102.4039.3452.02
Auto Pagination /wp-admin/admin.php?page=sh-page-links-options#auto_pagination1,6112.3237.5144.23
Single Page /wp-admin/admin.php?page=sh-page-links-options1,6162.3239.8448.50

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/page-links-single-page-option/addons/auto-pagination/auto-pagination-functions.php+29
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=sh-page-links-options
    • > Deprecated in wp-content/plugins/page-links-single-page-option/addons/auto-pagination/auto-pagination-functions.php+29
    Function create_function() is deprecated

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 11× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/page-links-single-page-option/addons/pagination-styles/pagination-styles.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/page-links-single-page-option/addons/auto-pagination/auto-pagination.php:22
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/page-links-single-page-option/addons/pagination-styles/pagination-styles.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/page-links-single-page-option/page-links.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/page-links-single-page-option/addons/pagination-styles/pagination-styles.php:23
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/page-links-single-page-option/addons/pagination-styles/pagination-styles.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/page-links-single-page-option/pages/page-plugin-options.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/page-links-single-page-option/addons/scrolling-pagination/scrolling-pagination.php:17
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/page-links-single-page-option/addons/auto-pagination/auto-pagination.php on line 13
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/page-links-single-page-option/addons/auto-pagination/auto-pagination.php on line 13

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sh-page-links-options
    • > Network (severe)
    https://player.vimeo.com/video/109187562 - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: pages, navigation, paginate, single page, pagination

page-links-single-page-option/page-links.php 92% from 13 tests

This is the main PHP file of "WordPress Pagination Plugin: Page-Links Plus" version 2.5.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("page-links-single-page-option.php" instead of "page-links.php")

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
No dangerous file extensions were detected3,229 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP155187832,235
PO File2220331746
CSS32311132
JavaScript4460116

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity16.71
▷ Minimum class complexity1.00
▷ Maximum class complexity81.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods87
▷ Static methods2022.99%
▷ Public methods8597.70%
▷ Protected methods00.00%
▷ Private methods22.30%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants7
▷ Global constants7100.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
16 PNG files occupy 0.35MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/auto-logo16x16.png0.70KB0.68KB▼ 1.69%
images/three-modules.png1.56KB1.54KB▼ 1.75%
images/logo-32x32.png1.58KB1.53KB▼ 3.22%
images/styles-logo16x16.png0.70KB0.72KB0.00%
images/status-ok.png48.75KB0.50KB▼ 98.98%