84% bns-featured-tag

Code Review | BNS Featured Tag

WordPress plugin BNS Featured Tag scored84%from 54 tests.

About plugin

  • Plugin page: bns-featured-tag
  • Plugin version: 2.7.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.5
  • WordPress version: 6.3.1
  • First release: Aug 26, 2009
  • Latest release: Apr 10, 2016
  • Number of updates: 56
  • Update frequency: every 43.2 days
  • Top authors: cais (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /10,278 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼10.06ms] Passed 4 tests

An overview of server-side resources used by BNS Featured Tag
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1545.81 ▼0.91
Dashboard /wp-admin3.45 ▲0.1052.11 ▼14.68
Posts /wp-admin/edit.php3.50 ▲0.1450.53 ▼1.87
Add New Post /wp-admin/post-new.php6.05 ▲0.1684.84 ▼20.95
Media Library /wp-admin/upload.php3.37 ▲0.1439.32 ▼2.73

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_bns-featured-tag
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for BNS Featured Tag
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲6014.20 ▼0.381.71 ▼0.2344.00 ▼11.72
Dashboard /wp-admin2,202 ▲225.66 ▼0.0196.11 ▼2.8842.40 ▼1.59
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0435.39 ▼0.3633.06 ▼6.10
Add New Post /wp-admin/post-new.php1,530 ▼523.39 ▲4.92663.12 ▼20.1467.86 ▲2.44
Media Library /wp-admin/upload.php1,404 ▲44.28 ▲0.14100.58 ▼14.2145.39 ▼5.91

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_bns-featured-tag
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bns-featured-tag/bns-featured-tag.php:55

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 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
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === bns-featured-tag === )
Please take inspiration from this readme.txt

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

"BNS Featured Tag" version 2.7.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 300 characters long)

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
Success! There were no dangerous files found in this plugin700 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP1230362654
CSS2173235
JavaScript122511

PHP code Passed 2 tests

A short 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.21
Average class complexity56.00
▷ Minimum class complexity56.00
▷ Maximum class complexity56.00
Average method complexity6.00
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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 are no PNG files in this plugin