84% bns-inline-asides

Code Review | BNS Inline Asides

WordPress plugin BNS Inline Asides scored84%from 54 tests.

About plugin

  • Plugin page: bns-inline-asides
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.9
  • WordPress version: 6.3.1
  • First release: Feb 20, 2011
  • Latest release: Jul 24, 2018
  • Number of updates: 38
  • Update frequency: every 71.3 days
  • Top authors: cais (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /4,133 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.32ms] Passed 4 tests

Server-side resources used by BNS Inline Asides
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0438.41 ▲1.00
Dashboard /wp-admin3.35 ▲0.0044.75 ▼15.23
Posts /wp-admin/edit.php3.40 ▲0.0444.90 ▼10.40
Add New Post /wp-admin/post-new.php5.93 ▲0.0484.36 ▼0.65
Media Library /wp-admin/upload.php3.27 ▲0.0433.69 ▲1.88

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

BNS Inline Asides: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲13613.83 ▼0.558.29 ▲6.8138.74 ▼0.79
Dashboard /wp-admin2,195 ▲185.48 ▼0.1881.81 ▼14.8139.63 ▲0.43
Posts /wp-admin/edit.php2,097 ▼61.99 ▲0.0034.79 ▼7.3636.22 ▼0.94
Add New Post /wp-admin/post-new.php1,526 ▼023.11 ▼0.52654.02 ▼17.6857.84 ▲2.50
Media Library /wp-admin/upload.php1,394 ▼04.16 ▼0.0696.16 ▲1.9243.97 ▼2.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/bns-inline-asides/bns-inline-asides.php:98

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: pages, content, shortcode, plugin-only, posts

bns-inline-asides/bns-inline-asides.php Passed 13 tests

"BNS Inline Asides" version 1.3.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
133 characters long description:
This plugin will allow you to style sections of post content with added emphasis by leveraging a style element from the active theme.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected395 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP182306164
CSS12310080
SVG10177
PO File26664
JavaScript113110

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods583.33%
▷ Protected methods116.67%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.25MB with 0.15MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/update.png11.02KB4.81KB▼ 56.36%
images/flame.png193.49KB49.06KB▼ 74.65%
images/hat.png49.08KB21.87KB▼ 55.43%