10% wp-blog-posts

Code Review | WP Blog Posts

WordPress plugin WP Blog Posts scored10%from 54 tests.

About plugin

  • Plugin page: wp-blog-posts
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 6.3.1
  • First release: Jun 30, 2020
  • Latest release: Aug 1, 2021
  • Number of updates: 4
  • Update frequency: every 99.5 days
  • Top authors: Laxman Prajapati (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /725 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WP_Blog_Posts::wpbp_active_function() should not be called statically

Server metrics [RAM: ▼0.92MB] [CPU: ▼38.07ms] Passed 4 tests

This is a short check of server-side resources used by WP Blog Posts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0322.72 ▼18.55
Dashboard /wp-admin3.04 ▼0.3121.54 ▼40.15
Posts /wp-admin/edit.php3.04 ▼0.3223.34 ▼24.33
Add New Post /wp-admin/post-new.php3.04 ▼2.8522.99 ▼69.23
Media Library /wp-admin/upload.php3.04 ▼0.2021.11 ▼10.61
WP Blog Posts /wp-admin/options-general.php?page=wp-blog-posts3.0424.13

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WP Blog Posts
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲5114.78 ▲0.401.65 ▼0.5840.92 ▼10.25
Dashboard /wp-admin2,212 ▲214.87 ▼0.96101.07 ▼15.1937.00 ▼10.86
Posts /wp-admin/edit.php2,095 ▲32.06 ▲0.0641.03 ▲3.5035.16 ▼7.68
Add New Post /wp-admin/post-new.php1,537 ▲2323.30 ▲5.61666.56 ▼16.2957.91 ▲1.02
Media Library /wp-admin/upload.php1,397 ▲94.23 ▲0.0497.36 ▲2.2142.03 ▲0.53
WP Blog Posts /wp-admin/options-general.php?page=wp-blog-posts8232.0125.3631.82

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WP_Blog_Posts::wpbp_add_menu() should not be called statically
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wp-blog-posts
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WP_Blog_Posts::wpbp_add_menu() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=wp-blog-posts
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WP_Blog_Posts::wpbp_setting_display() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=wp-blog-posts
    • > Notice in wp-content/plugins/wp-blog-posts/wp-blog-posts.php+152
    Undefined variable: wpbp_shortcode
    • > GET request to /wp-admin/options-general.php?page=wp-blog-posts
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WP_Blog_Posts::wpbp_assets() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=wp-blog-posts
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WP_Blog_Posts::wpbp_options_page() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=wp-blog-posts
    • > Deprecated in wp-admin/includes/template.php+1771
    Non-static method WP_Blog_Posts::wpbp_content_callback() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=wp-blog-posts
    • > Deprecated in wp-admin/includes/template.php+1824
    Non-static method WP_Blog_Posts::wpbp_setting_element() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=wp-blog-posts
    • > Deprecated in wp-admin/includes/template.php+1824
    Non-static method WP_Blog_Posts::wpbp_shortcode() should not be called statically

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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-blog-posts/wp-blog-posts.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can take inspiration from this readme.txt

wp-blog-posts/wp-blog-posts.php Passed 13 tests

The principal PHP file in "WP Blog Posts" v. 1.0.2 is loaded by WordPress automatically on each request
110 characters long description:
WP Blog Posts plugin ability to display blog posts with title, short description, date, etc... to our website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected238 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP22999158
CSS23280

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of 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.12
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/post-action.png0.81KB0.77KB▼ 5.07%
assets/images/wpbp_logo.png5.98KB5.20KB▼ 13.11%