72% meta-tag-manager

Code Review | Meta Tag Manager

WordPress plugin Meta Tag Manager scored72%from 54 tests.

About plugin

  • Plugin page: meta-tag-manager
  • Plugin version: 3.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.3
  • WordPress version: 6.3.1
  • First release: Apr 1, 2009
  • Latest release: Aug 9, 2023
  • Number of updates: 65
  • Update frequency: every 80.7 days
  • Top authors: netweblogic (96.92%)msykes (4.62%)

Code review

54 tests

User reviews

47 reviews

Install metrics

100,000+ active /802,007 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.14MB] [CPU: ▼5.97ms] Passed 4 tests

Analyzing server-side resources used by Meta Tag Manager
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0538.78 ▼0.78
Dashboard /wp-admin3.48 ▲0.1344.95 ▼16.40
Posts /wp-admin/edit.php3.59 ▲0.2349.01 ▲2.36
Add New Post /wp-admin/post-new.php6.19 ▲0.3092.59 ▼4.94
Media Library /wp-admin/upload.php3.40 ▲0.1733.47 ▼1.76
Meta Tag Manager /wp-admin/options-general.php?page=meta-tag-manager3.7644.28

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 52 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
mtm_version
can_compress_scripts
db_upgraded
mtm_custom
widget_recent-comments
mtm_data
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Meta Tag Manager
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.35 ▲0.001.79 ▼0.0648.25 ▲2.75
Dashboard /wp-admin2,202 ▲255.49 ▼0.0484.39 ▼19.1736.69 ▼6.96
Posts /wp-admin/edit.php2,101 ▼21.98 ▼0.0135.47 ▼0.5035.67 ▼0.02
Add New Post /wp-admin/post-new.php6,947 ▲5,41926.18 ▲3.15871.31 ▲212.2438.82 ▼20.44
Media Library /wp-admin/upload.php1,407 ▲44.16 ▼0.0595.67 ▼7.0343.72 ▼2.30
Meta Tag Manager /wp-admin/options-general.php?page=meta-tag-manager3,6724.4078.7470.24

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 9 options
    • mtm_version
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • mtm_custom
    • widget_recent-comments
    • mtm_data
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 output text when accessed directly:
    • > /wp-content/plugins/meta-tag-manager/admin/settings/go-pro.php
  • 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/meta-tag-manager/admin/settings/general.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Meta_Tag_Manager\\Open_Graph' not found in wp-content/plugins/meta-tag-manager/admin/settings/open-graph.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Meta_Tag_Manager\\is_admin() in wp-content/plugins/meta-tag-manager/classes/schema.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Meta_Tag_Manager\\is_admin() in wp-content/plugins/meta-tag-manager/classes/open-graph.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Meta_Tag_Manager\\Verify_Sites' not found in wp-content/plugins/meta-tag-manager/admin/settings/verify-sites.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Meta_Tag_Manager\\add_action() in wp-content/plugins/meta-tag-manager/admin/notices/admin-notices.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/meta-tag-manager/admin/settings/sidebar.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/meta-tag-manager/admin/settings/custom-meta-tags.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Meta_Tag_Manager\\add_action() in wp-content/plugins/meta-tag-manager/admin/notices/notices.php:266
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Meta_Tag_Manager\\is_admin() in wp-content/plugins/meta-tag-manager/classes/verify-sites.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=meta-tag-manager
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload,jquery-ui-core,jquery-ui-mouse,jquery-ui-sortable&ver=6.3.1 1:28609 "jQuery.Deferred exception: selected_value is not defined" "ReferenceError: selected_value is not defined\n at HTMLInputElement.\u003Canonymous> (/wp-admin/options-general.php?page=meta-tag-manager:694:6)\n at HTMLInputElement.dispatch (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload,jquery-ui-core,jquery-ui-mouse,jquery-ui-sortable&ver=6.3.1:2:39997)\n at v.handle (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload,jquery-ui-core,jquery-ui-mouse,jquery-ui-sortable&ver=6.3.1:2:37968)\n at Object.trigger (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload,jquery-ui-core,jquery-ui-mouse,jquery-ui-sortable&ver=6.3.1:2:70063)\n at HTMLInputElement.\u003Canonymous> (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload,jquery-ui-core,jquery-ui-mouse,jquery-ui-sortable&ver=6.3.1:2:70665)\n at Function.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload,jquery-ui-core,jquery-ui-mouse,jquery-ui-sortable&ver=6.3.1:2:3129)\n at e.\u003Ccomputed>.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload,jquery-ui-core,jquery-ui-mouse,jquery-ui-sortable&ver=6.3.1:2:1594)\n at e.\u003Ccomputed>.trigger (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload,jquery-ui-core,jquery-ui-mouse,jquery-ui-sortable&ver=6.3.1:2:70640)\n at HTMLDocument.\u003Canonymous> (/wp-admin/options-general.php?page=meta-tag-manager:698:7)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload,jquery-ui-core,jquery-ui-mouse,jquery-ui-sortable&ver=6.3.1:2:26990)" undefined
    • > GET request to /wp-admin/options-general.php?page=meta-tag-manager
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload,jquery-ui-core,jquery-ui-mouse,jquery-ui-sortable&ver=6.3.1 1:28721 Uncaught ReferenceError: selected_value is not defined

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add descriptions for these screenshots #4, #5, #6, #7 in meta-tag-manager/assets to your readme.txt
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

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

The main PHP script in "Meta Tag Manager" version 3.0.2 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 192 characters long)

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
No dangerous file extensions were detected7,102 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript65149412,901
PHP251463032,476
CSS40191,060
LESS64913533
PO File44887132

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity30.00
▷ Minimum class complexity4.00
▷ Maximum class complexity55.00
Average method complexity4.79
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods107
▷ Static methods6056.07%
▷ Public methods107100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG files were detected