84% bbp-last-post

Code Review | bbp last post

WordPress plugin bbp last post scored84%from 54 tests.

About plugin

  • Plugin page: bbp-last-post
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2
  • WordPress version: 6.3.1
  • First release: Mar 4, 2014
  • Latest release: Apr 6, 2023
  • Number of updates: 72
  • Update frequency: every 46.1 days
  • Top authors: Robin W (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

300+ active /8,748 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼0.45ms] Passed 4 tests

Server-side resources used by bbp last post
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.72 ▼4.03
Dashboard /wp-admin3.32 ▲0.0246.42 ▼5.06
Posts /wp-admin/edit.php3.37 ▲0.0249.78 ▲4.39
Add New Post /wp-admin/post-new.php5.90 ▲0.0290.51 ▲2.89
Media Library /wp-admin/upload.php3.25 ▲0.0239.76 ▲5.90
bbp last post /wp-admin/options-general.php?page=bbp-last-post-settings3.2131.25

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_last_post_replies_widget
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by bbp last post
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.60 ▼0.761.58 ▼0.2539.16 ▼5.91
Dashboard /wp-admin2,210 ▲225.84 ▲0.9799.91 ▼14.2036.54 ▼12.21
Posts /wp-admin/edit.php2,096 ▲42.06 ▲0.0839.28 ▲2.8836.05 ▲3.98
Add New Post /wp-admin/post-new.php1,517 ▼217.50 ▼5.68671.63 ▼19.1455.57 ▼3.08
Media Library /wp-admin/upload.php1,392 ▲44.22 ▼0.0899.31 ▼14.5644.16 ▼3.82
bbp last post /wp-admin/options-general.php?page=bbp-last-post-settings8602.1525.4031.15

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: 7 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_last_post_replies_widget
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/bbp-last-post/bbp-last-post.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bbp-last-post/includes/settings.php:94
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/bbp-last-post/includes/functions.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bbp-last-post/includes/lp-widgets.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues 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 need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (The display before this plugin), #2 (The display after this plugin), #3 (The settings page), #4 (The (last Post) Recent Replies Widget)
You can take inspiration from this readme.txt

bbp-last-post/bbp-last-post.php 92% from 13 tests

The main PHP file in "bbp last post" ver. 1.7 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 185 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected320 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4111128228
PO File1263392

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin