94% posts-per-page-changer-ui

Code Review | Posts Per Page Changer UI

WordPress plugin Posts Per Page Changer UI scored 94% from 53 tests.

About plugin

  • Plugin page: posts-per-page-ch...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.7
  • WordPress version: 5.8.1
  • First release: Aug 2, 2018
  • Latest release: Aug 2, 2018
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: extakahashi (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 394 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼308.41ms] Passed 4 tests

An overview of server-side resources used by Posts Per Page Changer UI
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1431.70 ▲10.92
Dashboard /wp-admin3.09 ▲0.0350.79 ▲8.53
Posts /wp-admin/edit.php3.14 ▲0.0337.90 ▼8.27
Add New Post /wp-admin/post-new.php5.45 ▲0.0288.84 ▼1,216.37
Media Library /wp-admin/upload.php3.03 ▲0.0232.39 ▼17.52
Posts Per Page Changer UI /wp-admin/options-general.php?page=posts_per_page_changer_ui_setting3.0028.99

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Posts Per Page Changer UI
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,681 ▲7515.86 ▼0.049.61 ▲1.7751.61 ▼1.49
Dashboard /wp-admin2,932 ▲825.92 ▲0.10156.45 ▲24.0699.45 ▼8.14
Posts /wp-admin/edit.php2,708 ▲52.69 ▲0.0167.07 ▲0.0791.79 ▼8.35
Add New Post /wp-admin/post-new.php3,710 ▲2,05415.21 ▼2.99446.85 ▲25.99119.94 ▲2.39
Media Library /wp-admin/upload.php1,777 ▲54.97 ▼0.02164.02 ▼4.70117.41 ▼7.13
Posts Per Page Changer UI /wp-admin/options-general.php?page=posts_per_page_changer_ui_setting1,0142.1055.8566.90

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however 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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/posts-per-page-changer-ui/posts-per-page-changer-ui.php:18

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
1 plugin tags: posts_per_page

posts-per-page-changer-ui/posts-per-page-changer-ui.php Passed 13 tests

The main PHP script in "Posts Per Page Changer UI" version 1.0.1 is automatically included on every request by WordPress
55 characters long description:
Add a UI(select) to change posts displayed on the page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected103 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1202497
JavaScript1306

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin