74% simple-custom-posts-per-page

Code Review | Simple Custom Posts per Page

WordPress plugin Simple Custom Posts per Page scored74%from 54 tests.

About plugin

  • Plugin page: simple-custom-pos...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-3.1
  • WordPress version: 6.3.1
  • First release: Feb 11, 2012
  • Latest release: Feb 11, 2012
  • Number of updates: 52
  • Update frequency: every 0.0 days
  • Top authors: Jabawack (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /3,373 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼1.22MB] [CPU: ▼43.84ms] Passed 4 tests

An overview of server-side resources used by Simple Custom Posts per Page
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.78 ▼0.6815.85 ▼24.41
Dashboard /wp-admin2.77 ▼0.5315.83 ▼31.45
Posts /wp-admin/edit.php2.78 ▼0.5818.23 ▼31.92
Add New Post /wp-admin/post-new.php2.77 ▼3.1115.29 ▼87.58
Media Library /wp-admin/upload.php2.77 ▼0.4514.94 ▼16.48

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Simple Custom Posts per Page
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.121.67 ▼0.2639.67 ▼4.76
Dashboard /wp-admin2,206 ▲185.91 ▲1.0499.27 ▼19.6837.82 ▼8.03
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0839.66 ▲3.8533.27 ▼2.06
Add New Post /wp-admin/post-new.php1,535 ▲1623.24 ▼0.25670.65 ▲49.4555.72 ▲9.63
Media Library /wp-admin/upload.php1,388 ▼34.17 ▼0.0794.83 ▼6.6340.71 ▼5.84

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5747
    Function load_plugin_textdomain was called with an argument that is deprecated since version 2.7.0 with no alternative available.
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/simple-custom-posts-per-page/ado-scpp.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Screenshot #1 (Options added in Reading Setting of Wordpress) image missing
You can look at the official readme.txt

simple-custom-posts-per-page/ado-scpp.php 92% from 13 tests

This is the main PHP file of "Simple Custom Posts per Page" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("simple-custom-posts-per-page.php" instead of "ado-scpp.php")

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
No dangerous file extensions were detected90 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2313146
PO File28644

PHP code Passed 2 tests

A short review 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.43
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%
Functions5
▷ Named functions5100.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.03MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png35.21KB19.87KB▼ 43.57%