78% metronet-tag-manager

Code Review | Metronet Tag Manager

WordPress plugin Metronet Tag Manager scored78%from 54 tests.

About plugin

Code review

54 tests

User reviews

8 reviews

Install metrics

30,000+ active /224,788 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼7.19ms] Passed 4 tests

Server-side resources used by Metronet Tag Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1841.10 ▼1.99
Dashboard /wp-admin3.47 ▲0.1748.75 ▼0.36
Posts /wp-admin/edit.php3.59 ▲0.2344.67 ▼7.44
Add New Post /wp-admin/post-new.php6.08 ▲0.2081.78 ▼18.95
Media Library /wp-admin/upload.php3.40 ▲0.1734.94 ▲3.19
Metronet Tag Manager /wp-admin/options-general.php?page=metronet-tag-manager3.37468.71

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
metronet_tag_manager
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Metronet Tag Manager
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.35 ▼0.361.68 ▲0.1742.98 ▲2.05
Dashboard /wp-admin2,199 ▲225.54 ▼0.0285.77 ▼0.3838.52 ▲0.82
Posts /wp-admin/edit.php2,104 ▲41.94 ▼0.0534.76 ▼2.9238.02 ▲4.04
Add New Post /wp-admin/post-new.php6,250 ▲4,72424.67 ▲1.51963.34 ▲292.8258.69 ▲7.07
Media Library /wp-admin/upload.php1,404 ▲74.24 ▲0.0394.45 ▼0.1738.98 ▼3.34
Metronet Tag Manager /wp-admin/options-general.php?page=metronet-tag-manager1,0812.2023.2733.12

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/metronet-tag-manager/gutenberg/class-gutenberg.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_register_script() in wp-content/plugins/metronet-tag-manager/tinyMCE/addparams.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/metronet-tag-manager/metronet-tag-manager.php:815

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% 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 need to be fixed: Please take inspiration from this readme.txt

metronet-tag-manager/metronet-tag-manager.php 92% from 13 tests

The principal PHP file in "Metronet Tag Manager" v. 1.5.5 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.9" instead of "4.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin2,074 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
CSS452481,171
PHP4130184685
JavaScript64914178
Markdown115040

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity42.50
▷ Minimum class complexity9.00
▷ Maximum class complexity76.00
Average method complexity3.02
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods41
▷ Static methods37.32%
▷ Public methods3380.49%
▷ Protected methods00.00%
▷ Private methods819.51%
Functions1
▷ Named functions1100.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
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/add-green.png0.93KB0.57KB▼ 38.29%
tinyMCE/img/metro_gtm.png1.79KB0.93KB▼ 48.12%
images/delete.png2.00KB1.41KB▼ 29.35%