94% smart-tag-insert

Code Review | Smart Tag Insert

WordPress plugin Smart Tag Insert scored 94% from 54 tests.

About plugin

  • Plugin page: smart-tag-insert
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-5.8
  • WordPress version: 5.8.1
  • First release: Sep 12, 2015
  • Latest release: Aug 9, 2021
  • Number of updates: 18
  • Update frequency: every 119.9 days
  • Top authors: Ste_95 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active / 3,498 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.17MB] [CPU: ▼138.00ms] Passed 4 tests

This is a short check of server-side resources used by Smart Tag Insert
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.99 ▲0.2739.36 ▲14.85
Dashboard /wp-admin3.22 ▲0.1657.44 ▲0.53
Posts /wp-admin/edit.php3.33 ▲0.2252.71 ▲1.17
Add New Post /wp-admin/post-new.php5.58 ▲0.15110.80 ▼546.57
Media Library /wp-admin/upload.php3.16 ▲0.1537.34 ▼7.13
Smart Tag Insert /wp-admin/options-general.php?page=sti-options3.1434.58

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 44 new files
Database: no new tables, 2 new options
New WordPress options
sti_settings
sti_current_version

Browser metrics Passed 4 tests

An overview of browser requirements for Smart Tag Insert
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲10215.92 ▲0.429.78 ▼4.2948.28 ▼3.58
Dashboard /wp-admin2,975 ▲445.86 ▼0.12173.86 ▲2.35116.79 ▼3.17
Posts /wp-admin/edit.php2,744 ▲52.71 ▼0.0070.85 ▼4.8795.82 ▼0.59
Add New Post /wp-admin/post-new.php1,686 ▲318.82 ▲0.08426.07 ▼4.52120.74 ▲1.95
Media Library /wp-admin/upload.php1,812 ▲645.04 ▲0.10167.60 ▼17.65121.30 ▼9.09
Smart Tag Insert /wp-admin/options-general.php?page=sti-options1,6222.8385.28120.39

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/smart-tag-insert/smart-tag-insert.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

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
7 plugin tags: automatic post tagger, smart tagging, post management, post, automatic tagging...

smart-tag-insert/smart-tag-insert.php Passed 13 tests

"Smart Tag Insert" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
89 characters long description:
Automatically adds most relevant tags to posts selecting them from an admin-defined list.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,374 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP10259403653
CSS847114619
JavaScript2248102

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity8.44
▷ Minimum class complexity5.00
▷ Maximum class complexity14.00
Average method complexity2.91
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods35
▷ Static methods2571.43%
▷ Public methods35100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
22 PNG files occupy 0.10MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
style/ui-lightness/images/ui-bg_flat_10_000000_40x100.png0.17KB0.08KB▼ 51.12%
style/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png3.67KB1.93KB▼ 47.53%
style/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png0.13KB0.18KB0.00%
style/ui-lightness/images/ui-icons_ffffff_256x240.png4.27KB4.11KB▼ 3.78%
style/ui-lightness/images/ui-icons_228ef1_256x240.png4.27KB4.11KB▼ 3.78%