78% global-meta-keyword-and-description

Code Review | Global Meta Keyword & Description

WordPress plugin Global Meta Keyword & Description scored 78% from 54 tests.

About plugin

  • Plugin page: global-meta-keywo...
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1+
  • WordPress version: 5.8.1
  • First release: Jun 12, 2014
  • Latest release: Jul 1, 2014
  • Number of updates: 12
  • Update frequency: every 1.6 days
  • Top authors: kunal.shivale (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

500+ active / 7,543 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.91MB] [CPU: ▼173.15ms] Passed 4 tests

Analyzing server-side resources used by Global Meta Keyword & Description
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1251.46 ▲20.44
Dashboard /wp-admin2.74 ▼0.3223.09 ▼24.70
Posts /wp-admin/edit.php2.74 ▼0.3720.02 ▼27.91
Add New Post /wp-admin/post-new.php2.74 ▼2.6921.00 ▼628.17
Media Library /wp-admin/upload.php2.74 ▼0.2618.66 ▼11.83
Global Meta Keyword & Description /wp-admin/options-general.php?page=GMKD2.7424.86

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Global Meta Keyword & Description
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,690 ▲9415.86 ▼0.109.20 ▼0.0963.20 ▲14.05
Dashboard /wp-admin2,980 ▲495.84 ▼0.16141.41 ▼11.34118.08 ▲5.26
Posts /wp-admin/edit.php2,746 ▲102.69 ▲0.0169.60 ▲2.4390.39 ▼2.05
Add New Post /wp-admin/post-new.php1,688 ▲1818.58 ▼0.58400.41 ▲26.28114.49 ▼2.20
Media Library /wp-admin/upload.php1,817 ▲75.02 ▲0.02152.82 ▲1.05120.47 ▲0.78
Global Meta Keyword & Description /wp-admin/options-general.php?page=GMKD1,1862.1063.1277.87

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5495
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=GMKD
    • > User deprecated in wp-includes/functions.php+5495
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=GMKD
    • > Notice in wp-content/plugins/global-meta-keyword-and-description/GMKD-options.php+1
    Undefined index: GMKD_hidden

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/global-meta-keyword-and-description/GMKD-options.php:24
    • > PHP Notice
      Undefined index: GMKD_hidden in wp-content/plugins/global-meta-keyword-and-description/GMKD-options.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/global-meta-keyword-and-description/GMKD.php:91

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

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
These attributes need your attention:
  • Screenshots: Screenshot #1 (Admin Panel view of Global Meta Keyword & Description screenshot-1.png) image missing
The official readme.txt is a good inspiration

global-meta-keyword-and-description/GMKD.php 92% from 13 tests

The main file in "Global Meta Keyword & Description" v. 2.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("global-meta-keyword-and-description.php" instead of "GMKD.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
No dangerous file extensions were detected179 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2169159
CSS10020

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png23.57KB14.02KB▼ 40.52%