78% breadcrumbspress

Code Review | BreadcrumbsPress

WordPress plugin BreadcrumbsPress scored 78% from 54 tests.

About plugin

  • Plugin page: breadcrumbspress
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 5.8.1
  • First release: Apr 14, 2021
  • Latest release: May 1, 2021
  • Number of updates: 6
  • Update frequency: every 3.2 days
  • Top authors: GDragoN (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 202 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.15MB] [CPU: ▼145.69ms] Passed 4 tests

Analyzing server-side resources used by BreadcrumbsPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.18 ▲0.3538.85 ▲8.31
Dashboard /wp-admin3.24 ▲0.1834.45 ▼11.03
Posts /wp-admin/edit.php3.29 ▲0.1849.24 ▲4.06
Add New Post /wp-admin/post-new.php5.53 ▲0.1093.50 ▼571.24
Media Library /wp-admin/upload.php3.12 ▲0.1233.35 ▼4.55
BreadcrumbsPress /wp-admin/options-general.php?page=breadcrumbspress3.1637.36

Server storage [IO: ▲2.64MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 370 new files
Database: no new tables, 12 new options
New WordPress options
d4p_blog_breadcrumbspress_style
d4p_blog_breadcrumbspress_integration
d4p_blog_breadcrumbspress_display
d4p_blog_breadcrumbspress_plain
d4p_blog_breadcrumbspress_title
d4p_blog_breadcrumbspress_visibility
d4p_blog_breadcrumbspress_rules
d4p_blog_breadcrumbspress_core
d4p_blog_breadcrumbspress_info
d4p_blog_breadcrumbspress_settings
...

Browser metrics Passed 4 tests

BreadcrumbsPress: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11215.82 ▲0.328.58 ▼1.9745.87 ▼5.61
Dashboard /wp-admin2,969 ▲385.98 ▼0.04171.85 ▲15.92110.73 ▼0.59
Posts /wp-admin/edit.php2,744 ▲82.72 ▲0.0170.98 ▲1.6683.88 ▼4.49
Add New Post /wp-admin/post-new.php1,686 ▲318.77 ▼0.06394.53 ▼13.03105.02 ▼9.28
Media Library /wp-admin/upload.php1,812 ▲25.04 ▲0.00158.00 ▼3.11117.34 ▲1.06
BreadcrumbsPress /wp-admin/options-general.php?page=breadcrumbspress1,2572.8367.2185.24

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 12 options
    • d4p_blog_breadcrumbspress_info
    • d4p_blog_breadcrumbspress_integration
    • d4p_blog_breadcrumbspress_title
    • d4p_blog_breadcrumbspress_core
    • d4p_blog_breadcrumbspress_settings
    • d4p_blog_breadcrumbspress_display
    • d4p_blog_breadcrumbspress_visibility
    • d4p_blog_breadcrumbspress_style
    • d4p_blog_breadcrumbspress_plain
    • d4p_blog_breadcrumbspress_path
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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 fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/breadcrumbspress/d4plib/forms/footer.php
    • > /wp-content/plugins/breadcrumbspress/d4plib/forms/content-dashboard.php
  • 44× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function breadcrumbspress_settings() in wp-content/plugins/breadcrumbspress/forms/content-dashboard-status.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/breadcrumbspress/forms/content-about-examples.php:4
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/breadcrumbspress/d4plib/forms/widget-loader.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Dev4Press\\v35\\Functions\\panel() in wp-content/plugins/breadcrumbspress/d4plib/forms/header.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Dev4Press\\v35\\Functions\\panel() in wp-content/plugins/breadcrumbspress/d4plib/forms/content-about-info.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/breadcrumbspress/breadcrumbspress.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/breadcrumbspress/d4plib/forms/content-tools-export.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/breadcrumbspress/d4plib/forms/fallback.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function breadcrumbspress_settings() in wp-content/plugins/breadcrumbspress/forms/content-dashboard-status.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/breadcrumbspress/d4plib/forms/widget-global.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: breadcrumb, crumb, navigation, schema, breadcrumbs...

breadcrumbspress/breadcrumbspress.php 92% from 13 tests

"BreadcrumbsPress" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 162 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin30,719 lines of code in 334 files:
LanguageFilesBlank linesComment linesLines of code
PHP1744,3932,26516,318
CSS461,138467,737
Sass5489064,168
JavaScript572321191,911
SVG200567
Markdown19018

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity15.64
▷ Minimum class complexity1.00
▷ Maximum class complexity141.00
Average method complexity2.74
▷ Minimum method complexity1.00
▷ Maximum method complexity65.00
Code structure
Namespaces39
Interfaces0
Traits4
Classes114
▷ Abstract classes2622.81%
▷ Concrete classes8877.19%
▷ Final classes1213.64%
Methods1,039
▷ Static methods868.28%
▷ Public methods77774.78%
▷ Protected methods16215.59%
▷ Private methods1009.62%
Functions126
▷ Named functions12599.21%
▷ Anonymous functions10.79%
Constants63
▷ Global constants1726.98%
▷ Class constants4673.02%
▷ Public constants46100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
d4plib/resources/css/flags/flags.png80.58KB26.01KB▼ 67.72%