10% functionality-for-boron-theme

Code Review | Functionality for Boron theme

WordPress plugin Functionality for Boron theme scored 10% from 54 tests.

About plugin

  • Plugin page: functionality-for...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.8
  • WordPress version: 5.9.2
  • First release: Apr 7, 2016
  • Latest release: Jun 5, 2017
  • Number of updates: 5
  • Update frequency: every 85.0 days
  • Top authors: sprincis (60%)Cohhe (60%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 3,759 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/functionality-for-boron-theme/includes/widgets/widget-about-author.php+7
    Methods with the same name as their class will not be constructors in a future version of PHP; boron_author has a deprecated constructor

Server metrics [RAM: ▼2.30MB] [CPU: ▼337.67ms] Passed 4 tests

A check of server-side resources used by Functionality for Boron theme
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.01 ▼1.124.58 ▼25.84
Dashboard /wp-admin2.03 ▼1.384.48 ▼28.51
Posts /wp-admin/edit.php2.03 ▼1.615.31 ▼31.35
Add New Post /wp-admin/post-new.php2.03 ▼4.944.29 ▼1,264.99
Media Library /wp-admin/upload.php2.03 ▼1.273.94 ▼21.68
Customize /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php2.064.61

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
widget_fastflickrwidget
widget_recent-posts-plus
widget_boron-directory-followers
widget_recent-posts
widget_recent-comments
widget_boron_author

Browser metrics Passed 4 tests

A check of browser resources used by Functionality for Boron theme
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,945 ▲22316.26 ▲0.239.51 ▲3.722.31 ▲0.00
Dashboard /wp-admin2,900 ▲466.14 ▲0.04115.96 ▼19.67155.72 ▼1.41
Posts /wp-admin/edit.php2,707 ▲193.24 ▲0.0263.39 ▼3.21138.42 ▼7.28
Add New Post /wp-admin/post-new.php1,668 ▼4316.20 ▼5.40406.90 ▼62.80155.88 ▼5.75
Media Library /wp-admin/upload.php1,715 ▲175.54 ▲0.03157.56 ▲4.32181.79 ▼14.35
Customize /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php8,83020.21519.40161.58

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/functionality-for-boron-theme/includes/widgets/widget-about-author.php+7
    Methods with the same name as their class will not be constructors in a future version of PHP; boron_author has a deprecated constructor
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_boron_author
    • widget_recent-posts
    • widget_boron-directory-followers
    • widget_fastflickrwidget
    • widget_recent-posts-plus
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Deprecated in wp-content/plugins/functionality-for-boron-theme/includes/widgets/widget-about-author.php+7
    Methods with the same name as their class will not be constructors in a future version of PHP; boron_author has a deprecated constructor
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Deprecated in wp-content/plugins/functionality-for-boron-theme/includes/widgets/widget-fast-flickr.php+291
    Function create_function() is deprecated
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-boron-theme/includes/widgets/widget-fast-flickr.php+115
    Undefined index: title
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-boron-theme/includes/widgets/widget-fast-flickr.php+116
    Undefined index: username
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-boron-theme/includes/widgets/widget-fast-flickr.php+117
    Undefined index: view
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-boron-theme/includes/widgets/widget-fast-flickr.php+118
    Undefined index: before_item
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-boron-theme/includes/widgets/widget-fast-flickr.php+119
    Undefined index: after_item
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-boron-theme/includes/widgets/widget-fast-flickr.php+120
    Undefined index: before_widget
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-boron-theme/includes/widgets/widget-fast-flickr.php+121
    Undefined index: after_widget
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-boron-theme/includes/widgets/widget-fast-flickr.php+122
    Undefined index: items
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-boron-theme/includes/widgets/widget-fast-flickr.php+123
    Undefined index: more_title
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-boron-theme/includes/widgets/widget-fast-flickr.php+124
    Undefined index: tags
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-boron-theme/includes/widgets/widget-fast-flickr.php+125
    Undefined index: target
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-boron-theme/includes/widgets/widget-fast-flickr.php+126
    Undefined index: show_titles
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-boron-theme/includes/widgets/widget-fast-flickr.php+127
    Undefined index: thickbox
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-boron-theme/includes/widgets/widget-fast-flickr.php+128
    Undefined index: random
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-boron-theme/includes/widgets/widget-fast-flickr.php+129
    Undefined index: random_tag
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-content/plugins/functionality-for-boron-theme/includes/widgets/widget-fast-flickr.php+130
    Undefined index: javascript
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-includes/class-wp-customize-nav-menus.php+1152
    Trying to get property 'title' of non-object

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
The following issues need your attention
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/functionality-for-boron-theme/admin/partials/boron-functionality-admin-display.php
    • > /wp-content/plugins/functionality-for-boron-theme/includes/widgets/widget-recent-posts-plus.php
    • > /wp-content/plugins/functionality-for-boron-theme/public/partials/boron-functionality-public-display.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/functionality-for-boron-theme/includes/widgets/widget-fast-flickr.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/functionality-for-boron-theme/includes/widgets/widget-about-author.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/functionality-for-boron-theme/includes/widgets/widget-followers.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: ecommerce, boron

functionality-for-boron-theme/functionality-for-boron-theme.php Passed 13 tests

"Functionality for Boron theme" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
51 characters long description:
This plugin contains Boron theme core functionality

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin2,069 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP194859851,866
PO File176163171
CSS210924
JavaScript26548

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity12.04
▷ Minimum class complexity1.00
▷ Maximum class complexity56.00
Average method complexity3.13
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes23
▷ Abstract classes28.70%
▷ Concrete classes2191.30%
▷ Final classes00.00%
Methods123
▷ Static methods1310.57%
▷ Public methods10585.37%
▷ Protected methods21.63%
▷ Private methods1613.01%
Functions11
▷ Named functions1090.91%
▷ Anonymous functions19.09%
Constants5
▷ Global constants5100.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
No PNG files were detected