78% lh-ogp-meta-tags

Code Review | LH OGP Meta

WordPress plugin LH OGP Meta scored78%from 54 tests.

About plugin

  • Plugin page: lh-ogp-meta-tags
  • Plugin version: 1.73
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 17, 2015
  • Latest release: Dec 1, 2017
  • Number of updates: 27
  • Update frequency: every 30.2 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /3,222 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
This plugin's installer ran successfully

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

An overview of server-side resources used by LH OGP Meta
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1525.53 ▼13.11
Dashboard /wp-admin3.47 ▲0.1745.11 ▼2.27
Posts /wp-admin/edit.php3.58 ▲0.2346.01 ▼1.77
Add New Post /wp-admin/post-new.php6.07 ▲0.1983.70 ▼6.64
Media Library /wp-admin/upload.php3.39 ▲0.1636.27 ▲0.90
OGP Meta Tags /wp-admin/options-general.php?page=lh-ogp-meta-tags/lh-ogp-meta-tags.php3.3628.40

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

LH OGP Meta: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲7613.26 ▼1.031.68 ▼0.1042.53 ▼4.58
Dashboard /wp-admin2,213 ▲254.88 ▼1.01107.00 ▼10.4141.70 ▼4.31
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0035.55 ▼10.1429.35 ▼4.91
Add New Post /wp-admin/post-new.php6,267 ▲4,73426.02 ▲3.04916.55 ▲267.1640.69 ▼18.77
Media Library /wp-admin/upload.php1,395 ▲74.24 ▲0.0195.71 ▼8.2142.97 ▼0.22
OGP Meta Tags /wp-admin/options-general.php?page=lh-ogp-meta-tags/lh-ogp-meta-tags.php8042.0324.1125.23

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

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
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=lh-ogp-meta-tags/lh-ogp-meta-tags.php
    • > Notice in wp-content/plugins/lh-ogp-meta-tags/partials/option-settings.php+21
    Trying to access array offset on value of type bool

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
Please fix the following items
  • 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/lh-ogp-meta-tags/lh-ogp-meta-tags.php:568
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/lh-ogp-meta-tags/partials/option-settings.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/lh-ogp-meta-tags/includes/multi-post-thumbnails.php:429

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Requires at least: Version format is invalid
You can look at the official readme.txt

lh-ogp-meta-tags/lh-ogp-meta-tags.php Passed 13 tests

This is the main PHP file of "LH OGP Meta" version 1.73, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
47 characters long description:
Customise your OGP meta tags the LocalHero way.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin689 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3358151574
JavaScript32114115

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity51.50
▷ Minimum class complexity47.00
▷ Maximum class complexity56.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods46
▷ Static methods613.04%
▷ Public methods3167.39%
▷ Protected methods00.00%
▷ Private methods1532.61%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin