83% opengraph-and-microdata-generator

Code Review | Opengraph and Microdata Generator

WordPress plugin Opengraph and Microdata Generator scored83%from 54 tests.

About plugin

  • Plugin page: opengraph-and-mic...
  • Plugin version: 3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4.2
  • WordPress version: 6.3.1
  • First release: Jan 6, 2012
  • Latest release: Nov 24, 2012
  • Number of updates: 17
  • Update frequency: every 19.0 days
  • Top authors: itsabhik (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /12,011 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.71ms] Passed 4 tests

A check of server-side resources used by Opengraph and Microdata Generator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.42 ▼0.0427.31 ▼15.81
Dashboard /wp-admin3.34 ▲0.0447.48 ▼1.95
Posts /wp-admin/edit.php3.40 ▲0.0451.30 ▼5.83
Add New Post /wp-admin/post-new.php5.93 ▲0.0484.38 ▼3.24
Media Library /wp-admin/upload.php3.27 ▲0.0440.78 ▲3.19
OpenGraph /wp-admin/options-general.php?page=og-settings3.2330.41

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
can_compress_scripts
wpogmclocale
widget_recent-comments
theysaidso_admin_options
wpogmcwordlimit
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Opengraph and Microdata Generator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5614.33 ▲0.051.80 ▲0.3043.21 ▲2.26
Dashboard /wp-admin2,199 ▲195.63 ▼0.0282.93 ▼4.3339.60 ▼3.21
Posts /wp-admin/edit.php2,101 ▲42.03 ▲0.0538.77 ▼1.4332.37 ▼6.34
Add New Post /wp-admin/post-new.php1,531 ▲523.11 ▼0.57685.15 ▼8.2266.19 ▲16.45
Media Library /wp-admin/upload.php1,404 ▲44.18 ▼0.0398.25 ▼18.2045.77 ▼2.74
OpenGraph /wp-admin/options-general.php?page=og-settings1,3222.1224.0445.16

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 8 options in the database
    • theysaidso_admin_options
    • wpogmcwordlimit
    • widget_recent-posts
    • widget_theysaidso_widget
    • wpogmclocale
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_action() in wp-content/plugins/opengraph-and-microdata-generator/opengraph-microdata.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Sample Output from the plugin), #2 (Settings Page)
Please take inspiration from this readme.txt

opengraph-and-microdata-generator/opengraph-microdata.php 85% from 13 tests

The primary PHP file in "Opengraph and Microdata Generator" version 3.4 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 158 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("opengraph-and-microdata-generator.php" instead of "opengraph-microdata.php")

Code Analysis Passed 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
No dangerous file extensions were detected243 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12017243

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.10
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 PNG files occupy 0.17MB with 0.10MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo.png22.65KB8.15KB▼ 64.04%
images/thumbnail.png55.50KB26.91KB▼ 51.51%
screenshot-2.png23.09KB9.68KB▼ 58.08%
screenshot-1.png72.96KB25.28KB▼ 65.35%