84% wp-smart-pagination

Code Review | WP Smart Pagination

WordPress plugin WP Smart Pagination scored84%from 54 tests.

About plugin

  • Plugin page: wp-smart-pagination
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.1.0-3.7.1
  • WordPress version: 6.3.1
  • First release: Nov 19, 2013
  • Latest release: Nov 19, 2013
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: kharisblank (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /11,094 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Analyzing server-side resources used by WP Smart Pagination
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.47 ▼6.90
Dashboard /wp-admin3.32 ▲0.0152.32 ▲1.58
Posts /wp-admin/edit.php3.37 ▲0.0147.70 ▼2.19
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.75 ▼17.45
Media Library /wp-admin/upload.php3.24 ▲0.0042.36 ▲0.18

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Smart Pagination
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.37 ▲0.021.66 ▼0.4143.99 ▲0.98
Dashboard /wp-admin2,195 ▲185.62 ▼0.0088.38 ▼4.7238.49 ▼6.62
Posts /wp-admin/edit.php2,100 ▼32.01 ▼0.0338.60 ▼2.7237.51 ▼1.40
Add New Post /wp-admin/post-new.php1,526 ▼223.41 ▲0.55662.67 ▼17.2057.24 ▼9.39
Media Library /wp-admin/upload.php1,403 ▲34.18 ▼0.08102.15 ▼5.9644.62 ▼3.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-smart-pagination/wp-smart-pagination.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Pagination)
  • Contributors: The plugin contributors field is missing
You can take inspiration from this readme.txt

wp-smart-pagination/wp-smart-pagination.php Passed 13 tests

"WP Smart Pagination" version 0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
108 characters long description:
Improve your WordPress powered blog pagination with extra input number where users can jump to any (x) page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected169 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS10070
LESS114168
PHP1241331

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.18
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png6.46KB3.94KB▼ 38.99%