78% wp-show-posts

Code Review | WP Show Posts

WordPress plugin WP Show Posts scored78%from 54 tests.

About plugin

  • Plugin page: wp-show-posts
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.1
  • WordPress version: 6.3.1
  • First release: Jul 23, 2016
  • Latest release: Jan 10, 2023
  • Number of updates: 46
  • Update frequency: every 51.4 days
  • Top authors: edge22 (100%)

Code review

54 tests

User reviews

79 reviews

Install metrics

100,000+ active /432,455 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 gracefully, with no errors

Server metrics [RAM: ▲0.61MB] [CPU: ▼3.84ms] Passed 4 tests

Analyzing server-side resources used by WP Show Posts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3745.00 ▼2.44
Dashboard /wp-admin4.00 ▲0.6958.76 ▲10.35
Posts /wp-admin/edit.php4.05 ▲0.6951.92 ▼1.39
Add New Post /wp-admin/post-new.php6.77 ▲0.8890.14 ▼18.52
Media Library /wp-admin/upload.php3.92 ▲0.6943.89 ▲7.01
All Lists /wp-admin/edit.php?post_type=wp_show_posts3.9639.89
Add New /wp-admin/post-new.php?post_type=wp_show_posts4.2345.47

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 72 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_wpsp_widget

Browser metrics Passed 4 tests

WP Show Posts: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲8214.06 ▼0.311.88 ▼0.1642.93 ▲0.82
Dashboard /wp-admin2,222 ▲425.58 ▼0.0785.37 ▼3.5438.28 ▼10.64
Posts /wp-admin/edit.php2,130 ▲302.02 ▲0.0136.30 ▼4.8334.85 ▼0.50
Add New Post /wp-admin/post-new.php1,551 ▲1622.97 ▲4.68635.52 ▲0.1052.60 ▼14.65
Media Library /wp-admin/upload.php1,430 ▲334.37 ▲0.15100.46 ▼3.4346.72 ▲1.64
All Lists /wp-admin/edit.php?post_type=wp_show_posts1,0882.0032.6834.92
Add New /wp-admin/post-new.php?post_type=wp_show_posts2,4733.32159.1833.96

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_wpsp_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 16× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/wp-show-posts/admin/butterbean/tmpl/nav.php
    • > /wp-content/plugins/wp-show-posts/admin/butterbean/tmpl/manager.php
    • > /wp-content/plugins/wp-show-posts/admin/butterbean/tmpl/control-radio-image.php
    • > /wp-content/plugins/wp-show-posts/admin/butterbean/tmpl/section.php
    • > /wp-content/plugins/wp-show-posts/admin/butterbean/tmpl/control-checkboxes.php
    • > /wp-content/plugins/wp-show-posts/admin/butterbean/tmpl/control-textarea.php
    • > /wp-content/plugins/wp-show-posts/admin/butterbean/tmpl/control-checkbox.php
    • > /wp-content/plugins/wp-show-posts/admin/butterbean/tmpl/control-radio.php
    • > /wp-content/plugins/wp-show-posts/admin/butterbean/tmpl/control-color.php
    • > /wp-content/plugins/wp-show-posts/admin/butterbean/tmpl/control-select-group.php
  • 21× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Setting' not found in wp-content/plugins/wp-show-posts/admin/butterbean/inc/settings/class-setting-date.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Control' not found in wp-content/plugins/wp-show-posts/admin/butterbean/inc/controls/class-control-palette.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Control' not found in wp-content/plugins/wp-show-posts/admin/butterbean/inc/controls/class-control-color.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Control' not found in wp-content/plugins/wp-show-posts/admin/butterbean/inc/controls/class-control-select-group.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/wp-show-posts/admin/butterbean/class-butterbean.php:144
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Control_Textarea' not found in wp-content/plugins/wp-show-posts/admin/butterbean/inc/controls/class-control-excerpt.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Control' not found in wp-content/plugins/wp-show-posts/admin/butterbean/inc/controls/class-control-datetime.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Setting' not found in wp-content/plugins/wp-show-posts/admin/butterbean/inc/settings/class-setting-datetime.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Control' not found in wp-content/plugins/wp-show-posts/admin/butterbean/inc/controls/class-control-parent.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'ButterBean_Control' not found in wp-content/plugins/wp-show-posts/admin/butterbean/inc/controls/class-control-date.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: display posts shortcode, post columns, portfolio, gallery, show posts

wp-show-posts/wp-show-posts.php 92% from 13 tests

The main PHP script in "WP Show Posts" version 1.1.4 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 233 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin5,159 lines of code in 67 files:
LanguageFilesBlank linesComment linesLines of code
PHP531,0472,6053,457
JavaScript5288491793
CSS510716508
Markdown41260401

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity11.20
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes25
▷ Abstract classes00.00%
▷ Concrete classes25100.00%
▷ Final classes14.00%
Methods144
▷ Static methods21.39%
▷ Public methods13795.14%
▷ Protected methods10.69%
▷ Private methods64.17%
Functions55
▷ Named functions55100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/butterbean/screenshot-1.png21.34KB10.57KB▼ 50.46%