84% bns-featured-category

Code Review | BNS Featured Category

WordPress plugin BNS Featured Category scored84%from 54 tests.

About plugin

  • Plugin page: bns-featured-cate...
  • Plugin version: 2.8.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.5
  • WordPress version: 6.3.1
  • First release: Aug 25, 2009
  • Latest release: Mar 13, 2016
  • Number of updates: 59
  • Update frequency: every 40.5 days
  • Top authors: cais (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

600+ active /44,040 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▲3.38ms] Passed 4 tests

This is a short check of server-side resources used by BNS Featured Category
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1743.34 ▲2.82
Dashboard /wp-admin3.46 ▲0.1653.55 ▲2.03
Posts /wp-admin/edit.php3.52 ▲0.1646.86 ▼1.27
Add New Post /wp-admin/post-new.php6.06 ▲0.18111.62 ▲15.05
Media Library /wp-admin/upload.php3.39 ▲0.1642.21 ▲9.93

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_bns-featured-category
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

BNS Featured Category: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.64 ▼0.561.73 ▲0.0043.22 ▲3.21
Dashboard /wp-admin2,207 ▲225.88 ▼0.01100.82 ▼7.6341.96 ▲0.58
Posts /wp-admin/edit.php2,093 ▲12.02 ▼0.0138.02 ▼7.2031.50 ▼7.64
Add New Post /wp-admin/post-new.php1,532 ▼318.20 ▼4.86605.71 ▼54.6864.32 ▲19.04
Media Library /wp-admin/upload.php1,386 ▲44.23 ▼0.0295.76 ▼5.9741.24 ▼3.09

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_bns-featured-category

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bns-featured-category/bns-featured-category.php:54

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 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
6 plugin tags: category, user-options, multi-widget, shortcode, posts...

bns-featured-category/bns-featured-category.php 92% from 13 tests

"BNS Featured Category" version 2.8.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 442 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin862 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP1230449645
PO File15659162
CSS2134140
JavaScript132615

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity84.00
▷ Minimum class complexity84.00
▷ Maximum class complexity84.00
Average method complexity6.93
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods17.14%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin