78% lava-bp-post

Code Review | Lava Bp Post

WordPress plugin Lava Bp Post scored78%from 54 tests.

About plugin

  • Plugin page: lava-bp-post
  • Plugin version: 1.0.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-5.9
  • WordPress version: 6.3.1
  • First release: Aug 17, 2017
  • Latest release: Apr 19, 2022
  • Number of updates: 25
  • Update frequency: every 68.5 days
  • Top authors: lavacode (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

700+ active /20,563 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

An overview of server-side resources used by Lava Bp Post
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.95 ▲0.4838.83 ▼0.51
Dashboard /wp-admin3.80 ▲0.4950.23 ▲4.06
Posts /wp-admin/edit.php3.86 ▲0.5057.42 ▲11.21
Add New Post /wp-admin/post-new.php6.32 ▲0.4392.85 ▼9.74
Media Library /wp-admin/upload.php3.64 ▲0.4139.15 ▲6.38
Settings /wp-admin/edit.php?page=lava-post-settings3.7244.38

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 60 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Lava Bp Post
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,026 ▲28015.16 ▲0.775.38 ▲3.5041.69 ▼1.42
Dashboard /wp-admin2,349 ▲1586.47 ▲0.61130.78 ▲26.7442.34 ▲3.09
Posts /wp-admin/edit.php2,270 ▲1813.32 ▲1.2954.38 ▲12.8034.89 ▼0.49
Add New Post /wp-admin/post-new.php6,235 ▲4,70625.87 ▲7.54881.76 ▲281.6139.40 ▼12.99
Media Library /wp-admin/upload.php1,397 ▲124.04 ▼0.2079.78 ▼19.0343.58 ▼1.36
Settings /wp-admin/edit.php?page=lava-post-settings1,3263.1444.5967.84

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/lava-bp-post/templates/template-listing-list.php
  • 22× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'lava_Array' not found in wp-content/plugins/lava-bp-post/templates/template-addItem.php:4
    • > PHP Notice
      Trying to get property 'label' of non-object in wp-content/plugins/lava-bp-post/includes/admin/admin-loop-addons.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/lava-bp-post/includes/admin/admin-metabox.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/lava-bp-post/templates/form/lava-add-item-user.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function lava_bpp() in wp-content/plugins/lava-bp-post/templates/form/lava-add-item-terms.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/lava-bp-post/includes/admin/admin-index.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/lava-bp-post/templates/form/lava-add-item-file.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function lava_bpp() in wp-content/plugins/lava-bp-post/templates/form/lava-add-item-notice.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Lava_Bp_Post_Func' not found in wp-content/plugins/lava-bp-post/includes/class-admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/lava-bp-post/includes/admin/admin-loop-addons.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (** Setting page ** - Lava BP Post plugin setting page.), #2 (** Back-end form ** - You can manager (add/edit/delete) posts information.), #3 (** Front-end form ** - Your user can add posts on front-end)
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt is a good inspiration

lava-bp-post/lava-bp-post.php 92% from 13 tests

Analyzing the main PHP file in "Lava Bp Post" version 1.0.10
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin6,048 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
PHP317282262,966
JavaScript123824611,303
LESS164471,022
CSS426765738
SVG10019

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity27.10
▷ Minimum class complexity3.00
▷ Maximum class complexity50.00
Average method complexity2.63
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods160
▷ Static methods116.88%
▷ Public methods160100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants00.00%
▷ Class constants21100.00%
▷ Public constants21100.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 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/lava_btn_slide_arrow.png1.67KB0.48KB▼ 71.02%
assets/images/no-image.png5.76KB2.30KB▼ 59.99%