84% heateor-open-graph-meta-tags

Code Review | Open Graph, Google Plus/Schema.org, Twitter Card Tags for WordPress

WordPress plugin Open Graph, Google Plus/Schema.org, Twitter Card Tags for WordPress scored84%from 54 tests.

About plugin

  • Plugin page: heateor-open-grap...
  • Plugin version: 1.1.11
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 22, 2016
  • Latest release: Aug 11, 2023
  • Number of updates: 52
  • Update frequency: every 49.6 days
  • Top authors: Heateor (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

3,000+ active /33,899 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▼0.85ms] Passed 4 tests

Analyzing server-side resources used by Open Graph, Google Plus/Schema.org, Twitter Card Tags for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2242.48 ▲3.65
Dashboard /wp-admin3.52 ▲0.2147.92 ▲0.93
Posts /wp-admin/edit.php3.64 ▲0.2844.53 ▼0.92
Add New Post /wp-admin/post-new.php6.10 ▲0.2191.97 ▼2.88
Media Library /wp-admin/upload.php3.45 ▲0.2134.81 ▼0.54

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 29 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
heateor_ogmt_version
heateor_ogmt

Browser metrics Passed 4 tests

This is an overview of browser requirements for Open Graph, Google Plus/Schema.org, Twitter Card Tags for WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,861 ▲11514.41 ▲0.211.95 ▲0.1544.01 ▲6.25
Dashboard /wp-admin2,213 ▲365.55 ▼0.07104.97 ▲19.2773.05 ▲30.07
Posts /wp-admin/edit.php2,115 ▲151.98 ▼0.0434.99 ▼2.6931.65 ▼3.05
Add New Post /wp-admin/post-new.php6,238 ▲4,70418.98 ▲0.53977.40 ▲350.2864.53 ▼0.92
Media Library /wp-admin/upload.php1,409 ▲154.21 ▼0.0597.31 ▼2.5577.52 ▲34.99

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 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • heateor_ogmt_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/heateor-open-graph-meta-tags/uninstall.php
    • > /wp-content/plugins/heateor-open-graph-meta-tags/admin/partials/heateor-open-graph-meta-tags-about.php
    • > /wp-content/plugins/heateor-open-graph-meta-tags/heateor-open-graph-meta-tags.php
    • > /wp-content/plugins/heateor-open-graph-meta-tags/admin/partials/heateor-open-graph-meta-tags-options-page.php

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

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: seo, open graph, twitter cards, twitter card, facebook open graph...

heateor-open-graph-meta-tags/heateor-open-graph-meta-tags.php 92% from 13 tests

The main file in "Open Graph, Google Plus/Schema.org, Twitter Card Tags for WordPress" v. 1.1.11 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 149 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin1,815 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP83034281,739
JavaScript38073
CSS1003

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please tend to the following items
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 154)
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity87.33
▷ Minimum class complexity4.00
▷ Maximum class complexity208.00
Average method complexity7.47
▷ Minimum method complexity1.00
▷ Maximum method complexity154.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods40
▷ Static methods00.00%
▷ Public methods3177.50%
▷ Protected methods00.00%
▷ Private methods922.50%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
6 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/close.png1.45KB1.66KB0.00%
images/star.png0.65KB0.72KB0.00%
images/transparent_bg.png0.91KB0.09KB▼ 89.70%
images/info.png0.77KB0.58KB▼ 25.13%
images/logo.png1.18KB1.33KB0.00%