90% custom-posts-per-page-reloaded

Code Review | Custom Posts Per Page Reloaded

WordPress plugin Custom Posts Per Page Reloaded scored90%from 54 tests.

About plugin

  • Plugin page: custom-posts-per-...
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.3
  • WordPress version: 6.3.1
  • First release: Jan 30, 2021
  • Latest release: Aug 9, 2023
  • Number of updates: 8
  • Update frequency: every 115.1 days
  • Top authors: WPZOOM (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /6,674 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼7.67ms] Passed 4 tests

An overview of server-side resources used by Custom Posts Per Page Reloaded
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0939.47 ▼13.29
Dashboard /wp-admin3.41 ▲0.1049.12 ▼2.51
Posts /wp-admin/edit.php3.52 ▲0.1649.88 ▼6.02
Add New Post /wp-admin/post-new.php5.99 ▲0.1094.70 ▼8.85
Media Library /wp-admin/upload.php3.33 ▲0.1038.86 ▲0.57
Posts Per Page /wp-admin/options-general.php?page=post-count-settings3.3034.17

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Posts Per Page Reloaded
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.23 ▼0.041.86 ▼0.2240.35 ▼1.33
Dashboard /wp-admin2,199 ▲195.65 ▼0.0288.69 ▼4.4239.87 ▼2.83
Posts /wp-admin/edit.php2,107 ▲71.96 ▼0.0644.70 ▲7.7235.79 ▼2.37
Add New Post /wp-admin/post-new.php1,540 ▲1418.31 ▼4.58615.28 ▼15.6868.23 ▲12.90
Media Library /wp-admin/upload.php1,407 ▲44.22 ▼0.0097.71 ▼10.2241.46 ▼3.15
Posts Per Page /wp-admin/options-general.php?page=post-count-settings9691.9643.7045.50

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 does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: administration, posts, number, settings, archives...

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

The main PHP script in "Custom Posts Per Page Reloaded" version 2.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected427 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP383173385
CSS18033
JavaScript1009

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.25
Average class complexity14.50
▷ Minimum class complexity5.00
▷ Maximum class complexity24.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin