84% bi-button-changer

Code Review | BI Button Changer

WordPress plugin BI Button Changer scored84%from 54 tests.

About plugin

  • Plugin page: bi-button-changer
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: Feb 20, 2017
  • Latest release: Feb 20, 2017
  • Number of updates: 10
  • Update frequency: every 0.1 days
  • Top authors: hidemion (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,579 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.73ms] Passed 4 tests

A check of server-side resources used by BI Button Changer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.63 ▼1.44
Dashboard /wp-admin3.31 ▲0.0143.96 ▼3.04
Posts /wp-admin/edit.php3.36 ▲0.0051.69 ▲1.66
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.22 ▼11.59
Media Library /wp-admin/upload.php3.23 ▲0.0032.55 ▲1.15

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by BI Button Changer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.61 ▼0.621.69 ▼0.2338.55 ▼7.36
Dashboard /wp-admin2,203 ▲155.85 ▲0.9995.94 ▼7.9140.19 ▼3.19
Posts /wp-admin/edit.php2,089 ▼02.10 ▲0.0838.19 ▼2.2834.96 ▲0.67
Add New Post /wp-admin/post-new.php1,536 ▼623.04 ▲4.91583.57 ▼60.6456.71 ▼5.75
Media Library /wp-admin/upload.php1,391 ▲94.14 ▼0.0697.05 ▼0.1842.13 ▼0.29

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

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 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 errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/bi-button-changer/bi-button-changer.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 97% 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
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (When you click the B button, change the output tag from <strong> to <b>.
    Bボタンをクリックすると、strongタグではなく、bタグになります。), #2 (When you click the I button, change the output tag from <em> to <i>.
    Iボタンをクリックすると、emタグではなく、iタグになります。)
Please take inspiration from this readme.txt

bi-button-changer/bi-button-changer.php Passed 13 tests

The main file in "BI Button Changer" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
118 characters long description:
In the visual editor and text editor, when you click the B button, change the output tag from strong to b and em to i.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin27 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP182127

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected