73% widget-pagination

Code Review | Widget Pagination

WordPress plugin Widget Pagination scored73%from 54 tests.

About plugin

  • Plugin page: widget-pagination
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.9.1
  • WordPress version: 6.3.1
  • First release: Jul 4, 2011
  • Latest release: Dec 6, 2017
  • Number of updates: 132
  • Update frequency: every 17.8 days
  • Top authors: jasie (85.61%)janasieber (9.09%)larsu (6.82%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /11,707 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.09MB] [CPU: ▼4.42ms] Passed 4 tests

Server-side resources used by Widget Pagination
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0723.25 ▼12.39
Dashboard /wp-admin3.40 ▲0.1044.00 ▲0.14
Posts /wp-admin/edit.php3.51 ▲0.1650.72 ▲4.41
Add New Post /wp-admin/post-new.php6.00 ▲0.1181.79 ▼6.87
Media Library /wp-admin/upload.php3.32 ▲0.0934.08 ▲1.43
Widget Paginaton /wp-admin/themes.php?page=widget-pagination3.6631.91

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

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

Browser metrics Passed 4 tests

Widget Pagination: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲19213.79 ▼0.895.27 ▲3.7539.73 ▲2.31
Dashboard /wp-admin2,231 ▲395.20 ▲0.26105.49 ▲0.6937.75 ▼6.17
Posts /wp-admin/edit.php2,095 ▲32.34 ▲0.3135.71 ▼2.9833.87 ▼1.41
Add New Post /wp-admin/post-new.php1,537 ▲123.42 ▲0.34650.36 ▲33.7937.83 ▼13.65
Media Library /wp-admin/upload.php1,411 ▲234.25 ▲0.0589.42 ▼10.2839.98 ▼2.70
Widget Paginaton /wp-admin/themes.php?page=widget-pagination3,1422.7485.9446.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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=widget-pagination
    • > Notice in wp-content/plugins/widget-pagination/admin/partials/widget-pagination-admin-display.php+181
    Trying to access array offset on value of type bool

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
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/widget-pagination/public/partials/widget-pagination-public-display.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/widget-pagination/admin/partials/widget-pagination-admin-display.php:18

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 97% from 29 tests

readme.txt 94% 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 your attention:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
The official readme.txt is a good inspiration

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

Analyzing the main PHP file in "Widget Pagination" version 1.0.0
139 characters long description:
This plugin lets you add a styleable pagination for the widgets Archives, Categories, Links, Meta, Pages, Recent Posts and Recent Comments.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin1,904 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP132667771,269
PO File2164537399
CSS2199141
JavaScript2297895

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.70
Average class complexity7.62
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity2.66
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods32
▷ Static methods26.25%
▷ Public methods2578.12%
▷ Protected methods13.12%
▷ Private methods618.75%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/legend.png3.20KB1.89KB▼ 40.97%