78% bm-grid

Code Review | BM Grid

WordPress plugin BM Grid scored78%from 54 tests.

About plugin

  • Plugin page: bm-grid
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7.2
  • WordPress version: 6.3.1
  • First release: Mar 20, 2017
  • Latest release: Mar 29, 2017
  • Number of updates: 3
  • Update frequency: every 2.3 days
  • Top authors: uiueux (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,036 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.46MB] [CPU: ▲0.68ms] Passed 4 tests

This is a short check of server-side resources used by BM Grid
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.4750.35 ▲3.33
Dashboard /wp-admin3.76 ▲0.4656.42 ▼4.25
Posts /wp-admin/edit.php3.81 ▲0.4564.69 ▲7.25
Add New Post /wp-admin/post-new.php6.35 ▲0.47101.02 ▼3.62
Media Library /wp-admin/upload.php3.68 ▲0.4545.49 ▲9.14
General Options /wp-admin/edit.php?post_type=bm-grid&page=ux-gallery-general-options3.6539.45
All Grids /wp-admin/edit.php?post_type=bm-grid3.7244.31
Add New /wp-admin/post-new.php?post_type=bm-grid3.7648.98

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for BM Grid
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,955 ▲19414.06 ▼0.5916.62 ▲14.8636.78 ▼8.26
Dashboard /wp-admin2,229 ▲495.61 ▼0.0493.86 ▼1.3261.69 ▲19.17
Posts /wp-admin/edit.php2,134 ▲372.02 ▼0.0139.75 ▲3.1237.19 ▲0.65
Add New Post /wp-admin/post-new.php6,301 ▲4,77526.03 ▲2.86897.58 ▲202.5538.06 ▼17.08
Media Library /wp-admin/upload.php1,434 ▲344.17 ▼0.03112.67 ▲5.5747.96 ▲4.00
General Options /wp-admin/edit.php?post_type=bm-grid&page=ux-gallery-general-options8512.0628.5626.79
All Grids /wp-admin/edit.php?post_type=bm-grid1,0981.9130.9329.50
Add New /wp-admin/post-new.php?post_type=bm-grid2,5082.9262.5575.63

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

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bm-grid/inc_php/interface/template/masonry-list.php:373
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bm-grid/inc_php/interface/template/irregular-list.php:152
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/bm-grid/inc_php/interface/shortcode.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/bm-grid/inc_php/interface/functions.php:100
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bm-grid/inc_php/admin/ajax.php:33

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/post-new.php?post_type=bm-grid
    • > Javascript (severe) in unknown
    /wp-content/plugins/bm-grid/js/admin-min.js?ver=0.0.1 7:220 Uncaught ReferenceError: _ is not defined

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === bm-grid === )
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
You can take inspiration from this readme.txt

bm-grid/bm-grid.php Passed 13 tests

The main PHP file in "BM Grid" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
72 characters long description:
BM Grid - Unlimited grid layout with Drag&Drop custom portfolio builder.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected4,536 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP103132021,945
CSS5120981,164
JavaScript82241321,134
PO File1125150267
SVG20126

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity23.50
▷ Minimum class complexity18.00
▷ Maximum class complexity29.00
Average method complexity4.91
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions1995.00%
▷ Anonymous functions15.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
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/skin/photoswipe/default/light-skin.png1.96KB0.72KB▼ 63.38%
images/arrow.png1.29KB0.48KB▼ 63.03%
css/skin/photoswipe/default/default-skin.png0.53KB0.72KB0.00%
images/gallery.png1.60KB0.66KB▼ 58.82%