90% formatting-extender

Code Review | Formatting Extender

WordPress plugin Formatting Extender scored 90% from 54 tests.

About plugin

  • Plugin page: formatting-extender
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.8
  • WordPress version: 6.3.1
  • First release: Jun 25, 2021
  • Latest release: Jul 20, 2021
  • Number of updates: 6
  • Update frequency: every 4.2 days
  • Top authors: gauravtiwari (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 479 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.01MB] [CPU: ▼2.84ms] Passed 4 tests

Server-side resources used by Formatting Extender
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0144.42 ▼0.49
Dashboard /wp-admin3.31 ▲0.0150.37 ▼10.62
Posts /wp-admin/edit.php3.36 ▲0.0153.91 ▲0.12
Add New Post /wp-admin/post-new.php5.89 ▲0.01105.74 ▲10.74
Media Library /wp-admin/upload.php3.23 ▲0.0138.94 ▼0.36

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Formatting Extender
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▼2213.31 ▼1.471.82 ▼0.3947.07 ▼0.01
Dashboard /wp-admin2,206 ▼04.86 ▼0.99108.32 ▲7.4243.49 ▲2.79
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0140.45 ▲3.0935.25 ▼0.32
Add New Post /wp-admin/post-new.php1,520 ▼2223.50 ▲5.28618.71 ▼91.7848.70 ▲0.14
Media Library /wp-admin/upload.php1,382 ▼64.21 ▼0.0198.61 ▼9.3043.09 ▲1.75

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 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)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were 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:
  • Plugin Name: You should set the name of your plugin on the first line ( === formatting-extender === )
The official readme.txt is a good inspiration

formatting-extender/formatting-extender.php Passed 13 tests

Analyzing the main PHP file in "Formatting Extender" version 1.0.2
134 characters long description:
This plugin extends the Block Editor formatting toolbar by adding new inline formatting controls like badge, highlights etc. and more.

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
Everything looks great! No dangerous files found in this plugin89 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript26250
PHP375238
CSS1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected