89% useful-tab-block-responsive-amp-compatible

Code Review | Useful Tab Block – Responsive & AMP-Compatible

WordPress plugin Useful Tab Block – Responsive & AMP-Compatible scored89%from 54 tests.

About plugin

  • Plugin page: useful-tab-block-...
  • Plugin version: 1.3.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.2
  • WordPress version: 6.3.1
  • First release: Feb 16, 2022
  • Latest release: Oct 6, 2023
  • Number of updates: 23
  • Update frequency: every 26.0 days
  • Top authors: bbc000tommy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,709 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.68ms] Passed 4 tests

A check of server-side resources used by Useful Tab Block – Responsive & AMP-Compatible
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.75 ▼0.92
Dashboard /wp-admin3.34 ▲0.0349.65 ▼2.23
Posts /wp-admin/edit.php3.39 ▲0.0352.01 ▲2.51
Add New Post /wp-admin/post-new.php5.93 ▲0.0492.41 ▼4.83
Media Library /wp-admin/upload.php3.26 ▲0.0336.64 ▲1.28

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Useful Tab Block – Responsive & AMP-Compatible
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5114.25 ▼0.101.73 ▲0.2044.00 ▲6.93
Dashboard /wp-admin2,216 ▲395.65 ▼0.0386.20 ▼13.4738.67 ▼7.82
Posts /wp-admin/edit.php2,118 ▲212.03 ▲0.0139.82 ▲0.7736.22 ▲3.55
Add New Post /wp-admin/post-new.php6,388 ▲4,86227.95 ▲4.73883.62 ▲217.1238.00 ▼12.62
Media Library /wp-admin/upload.php1,421 ▲184.15 ▼0.0695.22 ▼8.8243.98 ▲0.97

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention: The official readme.txt is a good inspiration

useful-tab-block-responsive-amp-compatible/register_block.php 77% from 13 tests

The main PHP file in "Useful Tab Block – Responsive & AMP-Compatible" ver. 1.3.2 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 160 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("useful-tab-block-responsive-amp-compatible.php" instead of "register_block.php")

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
There were no executable files found in this plugin1,197 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP7112104471
CSS642387
PO File16675195
JSON500142
JavaScript2002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
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
Namespaces1
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%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.37MB with 0.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/color_palette.png70.68KB15.30KB▼ 78.35%
images/favorite_colors.png198.14KB47.79KB▼ 75.88%
images/gutenberg.png51.33KB14.99KB▼ 70.80%
images/blue_border.png30.22KB5.86KB▼ 80.62%
images/shortcut.png25.47KB6.89KB▼ 72.96%