89% abbreviation-button-for-tinymce

Code Review | Abbreviation button for TinyMCE

WordPress plugin Abbreviation button for TinyMCE scored89%from 54 tests.

About plugin

  • Plugin page: abbreviation-butt...
  • Plugin version: 1.3.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.5
  • WordPress version: 6.3.1
  • First release: Sep 29, 2016
  • Latest release: Aug 13, 2020
  • Number of updates: 43
  • Update frequency: every 32.9 days
  • Top authors: audrasjb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,989 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Abbreviation button for TinyMCE
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.56 ▲1.53
Dashboard /wp-admin3.32 ▲0.0244.26 ▼3.98
Posts /wp-admin/edit.php3.37 ▲0.0245.13 ▼3.13
Add New Post /wp-admin/post-new.php5.91 ▲0.0290.10 ▼18.16
Media Library /wp-admin/upload.php3.25 ▲0.0232.38 ▼1.31

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Abbreviation button for TinyMCE
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3114.35 ▼0.041.60 ▲0.0242.32 ▲5.77
Dashboard /wp-admin2,198 ▲245.59 ▲0.0081.33 ▼4.6638.40 ▼4.77
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0533.66 ▼3.3632.27 ▼5.82
Add New Post /wp-admin/post-new.php1,526 ▼023.28 ▼0.10610.50 ▼23.6154.72 ▼4.44
Media Library /wp-admin/upload.php1,400 ▼04.19 ▼0.0194.12 ▼3.2841.17 ▼3.57

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 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 Passed 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
The SRP test was a success

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 15 tag instead of maximum 10
Please take inspiration from this readme.txt

abbreviation-button-for-tinymce/tinymce-abbr.php 92% from 13 tests

The primary PHP file in "Abbreviation button for TinyMCE" version 1.3.7 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("abbreviation-button-for-tinymce.php" instead of "tinymce-abbr.php")

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
There were no executable files found in this plugin170 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript13867
PO File1132453
PHP275050

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.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 methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.13MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png15.61KB5.76KB▼ 63.09%
assets/screenshot-2.png58.77KB18.40KB▼ 68.69%
assets/screenshot-1.png53.80KB14.55KB▼ 72.96%
assets/icon-128x128.png5.16KB1.36KB▼ 73.58%
admin/js/images/abbr-icon.png2.98KB0.28KB▼ 90.73%