73% bh-pagination

Code Review | BH Pagination

WordPress plugin BH Pagination scored73%from 54 tests.

About plugin

  • Plugin page: bh-pagination
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Nov 21, 2013
  • Latest release: Nov 27, 2013
  • Number of updates: 22
  • Update frequency: every 0.3 days
  • Top authors: masumbd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,304 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼1.97MB] [CPU: ▼52.59ms] Passed 4 tests

This is a short check of server-side resources used by BH Pagination
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.26 ▼40.24
Dashboard /wp-admin2.05 ▼1.3012.29 ▼44.62
Posts /wp-admin/edit.php2.05 ▼1.316.13 ▼36.16
Add New Post /wp-admin/post-new.php2.05 ▼3.845.67 ▼89.32
Media Library /wp-admin/upload.php2.05 ▼1.185.13 ▼28.59

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by BH Pagination
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲3513.20 ▼1.181.78 ▼0.0639.89 ▲2.12
Dashboard /wp-admin2,208 ▲235.79 ▼0.0796.54 ▼5.4340.11 ▼2.57
Posts /wp-admin/edit.php2,094 ▲22.04 ▲0.0339.56 ▲1.7539.36 ▲1.45
Add New Post /wp-admin/post-new.php1,516 ▼2023.02 ▼0.35647.17 ▼16.0651.47 ▲4.12
Media Library /wp-admin/upload.php1,390 ▲24.15 ▼0.0793.26 ▼6.5542.12 ▼1.70

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the bh_pagination-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/bh-pagination/bh-pagination.php:20
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/bh-pagination/bh-pagination.php on line 20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
  • Donate link: Please fix this invalid url: ""
  • Screenshots: Screenshot #1 (screenshot-3.jpg) image missing
Please take inspiration from this readme.txt

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

The principal PHP file in "BH Pagination" v. 1.0 is loaded by WordPress automatically on each request
104 characters long description:
Simple pagination plugin, build with using pagination code of bootstap. this is very easy to use plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin50 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP161828
CSS10922

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.10
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin