84% bns-early-adopter

Code Review | BNS Early Adopter

WordPress plugin BNS Early Adopter scored84%from 54 tests.

About plugin

  • Plugin page: bns-early-adopter
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.5
  • WordPress version: 6.3.1
  • First release: Mar 7, 2012
  • Latest release: Apr 10, 2016
  • Number of updates: 22
  • Update frequency: every 68.0 days
  • Top authors: cais (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,783 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▲1.39ms] Passed 4 tests

An overview of server-side resources used by BNS Early Adopter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.37 ▲1.53
Dashboard /wp-admin3.32 ▲0.0252.12 ▲5.07
Posts /wp-admin/edit.php3.37 ▲0.0149.93 ▲5.83
Add New Post /wp-admin/post-new.php5.90 ▲0.0293.62 ▼2.44
Media Library /wp-admin/upload.php3.24 ▲0.0133.45 ▲1.39

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

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

Browser metrics Passed 4 tests

A check of browser resources used by BNS Early Adopter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.18 ▼1.201.60 ▼0.2842.90 ▼3.82
Dashboard /wp-admin2,203 ▲125.78 ▼0.1296.26 ▼5.4438.49 ▼5.11
Posts /wp-admin/edit.php2,089 ▼01.99 ▲0.0039.40 ▲6.0539.17 ▲3.02
Add New Post /wp-admin/post-new.php1,533 ▲1423.30 ▼0.11640.22 ▼26.0949.40 ▼1.54
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.1495.07 ▼16.3342.67 ▼3.06

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_bns-early-adopter
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

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
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 fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bns-early-adopter/bns-early-adopter.php:53

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: shortcode, admin, version, widget

bns-early-adopter/bns-early-adopter.php Passed 13 tests

This is the main PHP file of "BNS Early Adopter" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
103 characters long description:
Show off you are an early adopter of WordPress (alpha, beta, release candidate, and/or stable versions)

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 plugin407 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP1126322280
PO File22828111
CSS132416

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity36.00
▷ Minimum class complexity36.00
▷ Maximum class complexity36.00
Average method complexity4.89
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin