84% tagmate-io-code-snippet-installer

Code Review | tagmate.io — code snippet installer

WordPress plugin tagmate.io — code snippet installer scored84%from 54 tests.

About plugin

  • Plugin page: tagmate-io-code-s...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.5
  • WordPress version: 6.3.1
  • First release: Aug 19, 2020
  • Latest release: Aug 19, 2020
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: tagmate (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /354 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.10ms] Passed 4 tests

This is a short check of server-side resources used by tagmate.io — code snippet installer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.39 ▼3.41
Dashboard /wp-admin3.35 ▲0.0146.57 ▼14.10
Posts /wp-admin/edit.php3.40 ▲0.0545.31 ▼1.00
Add New Post /wp-admin/post-new.php5.93 ▲0.0582.70 ▼9.89
Media Library /wp-admin/upload.php3.27 ▲0.0539.38 ▲5.05
Tagmate /wp-admin/options-general.php?page=tgm3.2131.38

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 10 new options
New WordPress options
theysaidso_admin_options
tgm_option_tag_status
widget_theysaidso_widget
tgm_option_platform_id
tgm_option_tag_location
widget_recent-comments
widget_recent-posts
db_upgraded
tgm_option_user_id
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for tagmate.io — code snippet installer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.61 ▼0.771.91 ▼0.4843.41 ▲1.21
Dashboard /wp-admin2,210 ▲255.89 ▲1.01107.78 ▼4.4141.08 ▲0.28
Posts /wp-admin/edit.php2,093 ▲42.03 ▼0.0336.89 ▼3.1433.04 ▼3.02
Add New Post /wp-admin/post-new.php1,536 ▲323.24 ▲0.16674.72 ▼4.6069.48 ▲17.72
Media Library /wp-admin/upload.php1,389 ▲14.13 ▼0.08107.70 ▼0.4748.04 ▲2.03
Tagmate /wp-admin/options-general.php?page=tgm9382.0730.3429.09

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 10 options in the database
    • tgm_option_platform_id
    • tgm_option_tag_location
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • tgm_option_user_id
    • widget_theysaidso_widget
    • tgm_option_tag_status

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=tgm
    • > Warning in wp-content/plugins/tagmate-io-code-snippet-installer/admin/settings.php+97
    Illegal string offset 'tmg_select_location'
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=tgm
    • > Notice in wp-content/plugins/tagmate-io-code-snippet-installer/admin/settings.php+97
    Uninitialized string offset: 0

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: code snippet, saas, widget, embed code, analytics

tagmate-io-code-snippet-installer/tagmate.php 92% from 13 tests

Analyzing the main PHP file in "tagmate.io — code snippet installer" version 1.0.0
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("tagmate-io-code-snippet-installer.php" instead of "tagmate.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 plugin254 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP510973254

PHP code Passed 2 tests

An short overview of 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.27
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.18MB with 0.09MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/tagmate-logo.png23.52KB12.20KB▼ 48.15%
screenshot-2.png156.39KB67.65KB▼ 56.74%