84% pppp

Code Review | Powerful Posts Per Page (PPPP)

WordPress plugin Powerful Posts Per Page (PPPP) scored84%from 54 tests.

About plugin

  • Plugin page: pppp
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.3
  • WordPress version: 6.3.1
  • First release: Oct 9, 2013
  • Latest release: Dec 3, 2019
  • Number of updates: 22
  • Update frequency: every 102.2 days
  • Top authors: Toro_Unit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /8,105 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.06MB] [CPU: ▼4.40ms] Passed 4 tests

A check of server-side resources used by Powerful Posts Per Page (PPPP)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.90 ▼6.15
Dashboard /wp-admin3.37 ▲0.0646.47 ▼1.85
Posts /wp-admin/edit.php3.48 ▲0.1247.25 ▲1.92
Add New Post /wp-admin/post-new.php5.95 ▲0.0682.81 ▼8.55
Media Library /wp-admin/upload.php3.29 ▲0.0633.29 ▼1.04

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Powerful Posts Per Page (PPPP)
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲8713.74 ▼0.611.75 ▼0.3345.86 ▼4.78
Dashboard /wp-admin2,250 ▲654.94 ▼0.88104.88 ▲1.5337.19 ▼8.40
Posts /wp-admin/edit.php2,133 ▲442.33 ▲0.3042.09 ▲5.3931.75 ▲0.47
Add New Post /wp-admin/post-new.php1,537 ▲1823.60 ▲0.38687.30 ▲26.8659.75 ▼0.80
Media Library /wp-admin/upload.php1,432 ▲414.36 ▲0.22106.26 ▲8.9244.53 ▲1.44

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

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
The smoke test was a success, however most plugin functionality was not tested

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
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'PPPP_Module' not found in wp-content/plugins/pppp/PPPP/Module/Option.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PPPP_Module' not found in wp-content/plugins/pppp/PPPP/Module/Admin.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PPPP_Module' not found in wp-content/plugins/pppp/PPPP/Module/Init.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PPPP_Module' not found in wp-content/plugins/pppp/PPPP/Module/Core.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pppp/PPPP/Module.php:17

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: cms, post type, taxonomy, posts per page

pppp/pppp.php Passed 13 tests

The main PHP script in "Powerful Posts Per Page (PPPP)" version 1.1.0 is automatically included on every request by WordPress
81 characters long description:
You can change posts per page by taxonomy or category or tag or custom post type.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin323 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP759200204
XML12939
PO File15533
JSON10030
Markdown18017

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity3.57
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.90
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes00.00%
Methods21
▷ Static methods314.29%
▷ Public methods1990.48%
▷ Protected methods00.00%
▷ Private methods29.52%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png29.01KB6.83KB▼ 76.46%