84% user-posts-per-page

Code Review | User Posts Per Page

WordPress plugin User Posts Per Page scored84%from 54 tests.

About plugin

  • Plugin page: user-posts-per-page
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.0
  • WordPress version: 6.3.1
  • First release: Nov 13, 2014
  • Latest release: Nov 20, 2014
  • Number of updates: 8
  • Update frequency: every 0.9 days
  • Top authors: arbet01 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,848 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.03ms] Passed 4 tests

A check of server-side resources used by User Posts Per Page
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.87 ▼2.93
Dashboard /wp-admin3.35 ▲0.0545.89 ▼2.90
Posts /wp-admin/edit.php3.47 ▲0.1148.61 ▲1.71
Add New Post /wp-admin/post-new.php5.93 ▲0.0591.23 ▼12.01
Media Library /wp-admin/upload.php3.28 ▲0.0537.09 ▲2.91
User Posts Per Page Options /wp-admin/options-general.php?page=uppp_site_options3.2429.00

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

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

Browser metrics Passed 4 tests

Checking browser requirements for User Posts Per Page
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.20 ▼1.181.76 ▼0.0643.14 ▼1.23
Dashboard /wp-admin2,210 ▲224.85 ▼1.03108.21 ▼5.8741.30 ▼8.26
Posts /wp-admin/edit.php2,096 ▲101.97 ▼0.0439.41 ▲2.5936.41 ▲0.75
Add New Post /wp-admin/post-new.php1,531 ▲1123.31 ▲0.01673.19 ▲1.7053.73 ▼3.23
Media Library /wp-admin/upload.php1,392 ▲44.23 ▼0.0196.10 ▼4.6543.36 ▲0.43
User Posts Per Page Options /wp-admin/options-general.php?page=uppp_site_options7822.0323.9226.92

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_user_posts_per_page
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

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 everything seems fine, this is not an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/user-posts-per-page/user-posts-per-page.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/user-posts-per-page/lib/class-uppp-widget.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/user-posts-per-page/inc/network-options.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/user-posts-per-page/inc/site-options.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
The official readme.txt might help

user-posts-per-page/user-posts-per-page.php 92% from 13 tests

The primary PHP file in "User Posts Per Page" version 1.0.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Domain Path: The domain path folder does not exist ("/languages")

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 detected221 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP5121158216
JavaScript1465

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity9.50
▷ Minimum class complexity3.00
▷ Maximum class complexity16.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1588.24%
▷ Protected methods00.00%
▷ Private methods211.76%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin