84% abbreviation-button-for-the-block-editor

Code Review | Abbreviation Button for the Block Editor

WordPress plugin Abbreviation Button for the Block Editor scored84%from 54 tests.

About plugin

  • Plugin page: abbreviation-butt...
  • Plugin version: 0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.1
  • WordPress version: 6.3.1
  • First release: Nov 24, 2022
  • Latest release: Nov 25, 2022
  • Number of updates: 6
  • Update frequency: every 1.0 days
  • Top authors: audrasjb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,732 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.01MB] [CPU: ▼4.35ms] Passed 4 tests

Server-side resources used by Abbreviation Button for the Block Editor
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.62 ▼1.17
Dashboard /wp-admin3.32 ▲0.0143.96 ▼0.14
Posts /wp-admin/edit.php3.37 ▲0.0144.46 ▼6.90
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.94 ▼9.18
Media Library /wp-admin/upload.php3.24 ▲0.0140.81 ▲4.27

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Abbreviation Button for the Block Editor
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.20 ▼0.794.70 ▲3.1040.52 ▲1.28
Dashboard /wp-admin2,203 ▲155.77 ▲0.8696.45 ▼4.4039.84 ▼0.90
Posts /wp-admin/edit.php2,086 ▼32.01 ▼0.0435.17 ▼7.2730.99 ▼5.78
Add New Post /wp-admin/post-new.php1,521 ▼2123.43 ▲5.46603.28 ▼81.8153.49 ▼13.66
Media Library /wp-admin/upload.php1,388 ▼04.15 ▼0.0593.36 ▼17.1242.00 ▼6.51

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/abbreviation-button-for-the-block-editor/abbreviation-button-for-the-block-editor.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: acronym, block editor, lang, abbreviation, accessibility

abbreviation-button-for-the-block-editor/abbreviation-button-for-the-block-editor.php Passed 13 tests

This is the main PHP file of "Abbreviation Button for the Block Editor" version 0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
80 characters long description:
Add an abbreviation format button to the formatting toolbar in the block editor.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected27,575 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JSON20027,470
JavaScript29176
PHP23921
Sass1007
CSS1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin