10% easy-bricks-navigation

Code Review | Easy Bricks Navigation

WordPress plugin Easy Bricks Navigation scored10%from 54 tests.

About plugin

  • Plugin page: easy-bricks-navig...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.1
  • WordPress version: 6.3.1
  • First release: Feb 20, 2023
  • Latest release: Feb 20, 2023
  • Number of updates: 4
  • Update frequency: every 1.0 days
  • Top authors: gronbach (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /279 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • The plugin cannot be installed
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▲0.04MB] [CPU: ▼19.15ms] Passed 4 tests

A check of server-side resources used by Easy Bricks Navigation
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2125.69 ▼18.99
Dashboard /wp-admin3.37 ▲0.0730.23 ▼23.16
Posts /wp-admin/edit.php3.45 ▲0.0939.67 ▼10.30
Add New Post /wp-admin/post-new.php5.72 ▼0.1668.90 ▼24.16
Media Library /wp-admin/upload.php3.38 ▲0.1530.22 ▼4.49
All Bricks Menu-Items /wp-admin/edit.php?post_type=ebn_menuitem_cpt3.4534.11
Easy Bricks Navigation /wp-admin/admin.php?page=ebn_admin_main3.3630.82

Server storage [IO: ▲0.15MB] [DB: ▲0.02MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Easy Bricks Navigation: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,008 ▲1,25114.19 ▲0.026.61 ▲4.3936.77 ▼7.04
Dashboard /wp-admin2,772 ▲5845.01 ▲0.11112.55 ▼5.6538.88 ▼11.29
Posts /wp-admin/edit.php2,655 ▲5662.30 ▲0.2638.50 ▲2.5732.00 ▼4.47
Add New Post /wp-admin/post-new.php2,076 ▲55623.33 ▲0.36695.31 ▲71.2238.59 ▼12.73
Media Library /wp-admin/upload.php1,957 ▲5724.39 ▲0.2198.51 ▼11.7040.62 ▼3.62
All Bricks Menu-Items /wp-admin/edit.php?post_type=ebn_menuitem_cpt4,6242.3039.4033.89
Easy Bricks Navigation /wp-admin/admin.php?page=ebn_admin_main1,4442.3323.6929.13

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 25% 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
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ebn_admin_main
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/easy-bricks-navigation/public/partials/easy-bricks-navigation-public-display.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/easy-bricks-navigation/admin/partials/ebn-admin-main.php:22

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)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === easy-bricks-navigation === )
The official readme.txt is a good inspiration

easy-bricks-navigation/easy-bricks-navigation.php Passed 13 tests

Analyzing the main PHP file in "Easy Bricks Navigation" version 1.0.0
49 characters long description:
Makes navigation inside bricks page builder easy.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin2,633 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP133205911,367
JavaScript419489959
CSS4538307

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity12.00
▷ Minimum class complexity1.00
▷ Maximum class complexity67.00
Average method complexity2.66
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods53
▷ Static methods35.66%
▷ Public methods4890.57%
▷ Protected methods00.00%
▷ Private methods59.43%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/ebn-logo2.png3.60KB2.28KB▼ 36.68%