84% bns-site-data

Code Review | BNS Site Data

WordPress plugin BNS Site Data scored 84% from 54 tests.

About plugin

  • Plugin page: bns-site-data
  • Plugin version: 0.4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.5
  • WordPress version: 6.3.1
  • First release: Sep 17, 2012
  • Latest release: Apr 10, 2016
  • Number of updates: 19
  • Update frequency: every 68.7 days
  • Top authors: cais (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,243 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

A check of server-side resources used by BNS Site Data
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.04 ▼6.00
Dashboard /wp-admin3.32 ▲0.0244.39 ▼1.13
Posts /wp-admin/edit.php3.37 ▲0.0243.49 ▼2.29
Add New Post /wp-admin/post-new.php5.90 ▲0.0292.42 ▲10.22
Media Library /wp-admin/upload.php3.24 ▲0.0232.95 ▼0.30

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_bns-site-data
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for BNS Site Data
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲11913.58 ▼1.055.76 ▲4.0239.03 ▼6.79
Dashboard /wp-admin2,209 ▼04.87 ▼0.9896.55 ▼12.2841.69 ▼2.36
Posts /wp-admin/edit.php2,089 ▲32.05 ▲0.0234.38 ▲1.2829.54 ▼5.99
Add New Post /wp-admin/post-new.php1,542 ▲1418.39 ▼4.96625.29 ▼58.6057.38 ▼3.35
Media Library /wp-admin/upload.php1,388 ▼34.19 ▼0.0494.47 ▼8.0040.63 ▼4.88

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_bns-site-data
    • 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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions 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-site-data/bns-site-data.php:52

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: widget-only, site-statistics

bns-site-data/bns-site-data.php Passed 13 tests

The main PHP script in "BNS Site Data" version 0.4.3 is automatically included on every request by WordPress
32 characters long description:
Show some basic site statistics.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin290 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1103307264
CSS153223
JavaScript11333

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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