78% carbon-breadcrumbs

Code Review | Carbon Breadcrumbs

WordPress plugin Carbon Breadcrumbs scored78%from 54 tests.

About plugin

  • Plugin page: carbon-breadcrumbs
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.5
  • WordPress version: 6.3.1
  • First release: Jan 8, 2016
  • Latest release: Apr 12, 2016
  • Number of updates: 7
  • Update frequency: every 13.6 days
  • Top authors: tyxla (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

90+ active /2,131 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.28MB] [CPU: ▼3.45ms] Passed 4 tests

Analyzing server-side resources used by Carbon Breadcrumbs
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2641.20 ▼1.23
Dashboard /wp-admin3.59 ▲0.2953.14 ▼1.10
Posts /wp-admin/edit.php3.64 ▲0.2951.18 ▲1.66
Add New Post /wp-admin/post-new.php6.17 ▲0.2987.70 ▼13.12
Media Library /wp-admin/upload.php3.52 ▲0.2938.24 ▲8.31
Carbon Breadcrumbs /wp-admin/options-general.php?page=carbon_breadcrumbs_settings3.4237.17

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 164 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Carbon Breadcrumbs
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.30 ▲0.071.96 ▲0.2246.28 ▼0.24
Dashboard /wp-admin2,202 ▲255.67 ▲0.0887.20 ▼6.5539.95 ▼1.87
Posts /wp-admin/edit.php2,101 ▲12.04 ▼0.0234.01 ▼4.8838.91 ▲0.63
Add New Post /wp-admin/post-new.php1,548 ▲323.10 ▼0.08639.29 ▼68.8852.97 ▲5.38
Media Library /wp-admin/upload.php1,407 ▲74.30 ▼0.0597.48 ▼16.3943.25 ▼4.73
Carbon Breadcrumbs /wp-admin/options-general.php?page=carbon_breadcrumbs_settings9422.0523.2433.25

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/carbon-breadcrumbs/tests/bootstrap.php
  • 140× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Breadcrumb_Item' not found in wp-content/plugins/carbon-breadcrumbs/core/Carbon_Breadcrumb_Item_DB_Object.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/carbon-breadcrumbs/tests/unit-tests/Carbon_Breadcrumb_Item_Term/CarbonBreadcrumbItemTermSetupTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/carbon-breadcrumbs/tests/unit-tests/Carbon_Breadcrumb_Item_Renderer/CarbonBreadcrumbItemRendererGetItemLinkTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/carbon-breadcrumbs/tests/unit-tests/Carbon_Breadcrumb_Admin/CarbonBreadcrumbAdminApplySettingsTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/carbon-breadcrumbs/tests/unit-tests/Carbon_Breadcrumb_Item/CarbonBreadcrumbItemGetSetSubtypeTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/carbon-breadcrumbs/tests/unit-tests/Carbon_Breadcrumb_Admin/CarbonBreadcrumbAdminRegisterSettingsTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/carbon-breadcrumbs/tests/unit-tests/Carbon_Breadcrumb_Item_Renderer/CarbonBreadcrumbItemRendererRenderLinkAfterTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/carbon-breadcrumbs/tests/unit-tests/Carbon_Breadcrumb_Item_Renderer/CarbonBreadcrumbItemRendererConstructTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/carbon-breadcrumbs/tests/unit-tests/Carbon_Breadcrumb_Item_Custom/CarbonBreadcrumbItemCustomSetupTest.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/carbon-breadcrumbs/core/Carbon_Breadcrumb_L10n.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
You can look at the official readme.txt

carbon-breadcrumbs/carbon-breadcrumbs.php 92% from 13 tests

The main file in "Carbon Breadcrumbs" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin5,374 lines of code in 158 files:
LanguageFilesBlank linesComment linesLines of code
PHP1501,4932,7714,889
Markdown21420265
PO File1272879
Bourne Shell1191960
YAML29048
JSON10018
XML10015

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.05
Average class complexity1.74
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity1.16
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes150
▷ Abstract classes53.33%
▷ Concrete classes14596.67%
▷ Final classes00.00%
Methods685
▷ Static methods91.31%
▷ Public methods68399.71%
▷ Protected methods10.15%
▷ Private methods10.15%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected