84% bw-post-grid

Code Review | BW Post Grid

WordPress plugin BW Post Grid scored84%from 54 tests.

About plugin

  • Plugin page: bw-post-grid
  • Plugin version: 0.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.2.2
  • WordPress version: 6.3.1
  • First release: Aug 20, 2019
  • Latest release: Aug 20, 2019
  • Number of updates: 5
  • Update frequency: every 4.2 days
  • Top authors: bluwebzwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /691 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.24ms] Passed 4 tests

An overview of server-side resources used by BW Post Grid
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.11 ▼1.69
Dashboard /wp-admin3.34 ▲0.0347.68 ▼2.88
Posts /wp-admin/edit.php3.39 ▲0.0348.67 ▼2.55
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.03 ▼17.57
Media Library /wp-admin/upload.php3.26 ▲0.0333.86 ▼1.97

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by BW Post Grid
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.20 ▼0.361.96 ▼0.0842.31 ▼3.67
Dashboard /wp-admin2,192 ▲155.58 ▼0.0487.30 ▼13.2239.05 ▼6.40
Posts /wp-admin/edit.php2,107 ▲72.01 ▲0.0540.69 ▲2.8133.72 ▼1.96
Add New Post /wp-admin/post-new.php1,535 ▲917.99 ▼5.73650.89 ▼20.7578.54 ▲26.79
Media Library /wp-admin/upload.php1,397 ▼64.18 ▼0.20101.31 ▼6.0743.94 ▲0.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/bw-post-grid/bw-post-grid-shortcode.php:208

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (screenshot-1.jpg), #2 (screenshot-2.jpg)
Please take inspiration from this readme.txt

bw-post-grid/bw-post-grid.php 92% from 13 tests

This is the main PHP file of "BW Post Grid" version 0.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • 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 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin1,050 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS2514654
PHP39824396

PHP code Passed 2 tests

This is a very shot 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.24
Average class complexity1.50
▷ Minimum class complexity1.00
▷ Maximum class complexity2.00
Average method complexity1.10
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods10
▷ Static methods110.00%
▷ Public methods880.00%
▷ Protected methods220.00%
▷ Private methods00.00%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin