84% posts-in-page

Code Review | Posts in Page

WordPress plugin Posts in Page scored84%from 54 tests.

About plugin

  • Plugin page: posts-in-page
  • Plugin version: 1.4.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.2
  • WordPress version: 6.3.1
  • First release: Feb 27, 2012
  • Latest release: May 13, 2019
  • Number of updates: 77
  • Update frequency: every 34.2 days
  • Top authors: sewmyheadon (62.34%)dgilfoy (24.68%)ivycat (15.58%)

Code review

54 tests

User reviews

86 reviews

Install metrics

20,000+ active /372,508 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.31ms] Passed 4 tests

Analyzing server-side resources used by Posts in Page
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.27 ▼3.08
Dashboard /wp-admin3.36 ▲0.0644.75 ▼5.00
Posts /wp-admin/edit.php3.48 ▲0.1246.24 ▼3.41
Add New Post /wp-admin/post-new.php5.94 ▲0.0689.08 ▼9.75
Media Library /wp-admin/upload.php3.28 ▲0.0634.47 ▲2.48
Posts in Page /wp-admin/options-general.php?page=posts_in_page3.2930.20

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Posts in Page
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.63 ▼0.751.79 ▼0.1941.74 ▼3.26
Dashboard /wp-admin2,207 ▲194.83 ▼1.09101.71 ▼13.5339.05 ▼9.00
Posts /wp-admin/edit.php2,093 ▲252.05 ▲0.0040.47 ▲3.4036.60 ▲2.65
Add New Post /wp-admin/post-new.php1,545 ▲1018.32 ▼4.68608.34 ▼40.2753.28 ▼16.46
Media Library /wp-admin/upload.php1,392 ▲14.16 ▼0.1192.61 ▼10.4441.11 ▼6.62
Posts in Page /wp-admin/options-general.php?page=posts_in_page1,3962.1928.4143.86

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_permalink() in wp-content/plugins/posts-in-page/templates/posts_loop_template.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/posts-in-page/admin/views/help-main.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/posts-in-page/includes/class-page-posts.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/posts-in-page/posts_in_page.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 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
6 plugin tags: shortcode, terms, custom post types, taxonomy, posts...

posts-in-page/posts_in_page.php 85% from 13 tests

The main PHP script in "Posts in Page" version 1.4.4 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("posts-in-page.php" instead of "posts_in_page.php")
  • Description: The description should be shorter than 140 characters (currently 151 characters long)

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
Everything looks great! No dangerous files found in this plugin840 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4118177661
CSS13117169
JavaScript10010

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity27.50
▷ Minimum class complexity2.00
▷ Maximum class complexity53.00
Average method complexity4.31
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1168.75%
▷ Protected methods531.25%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/ivycat-sq.png4.79KB2.78KB▼ 41.95%