83% fb-opengraph-tags

Code Review | OpenGraph Tags for Single Posts

WordPress plugin OpenGraph Tags for Single Posts scored83%from 54 tests.

About plugin

  • Plugin page: fb-opengraph-tags
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9+
  • WordPress version: 6.3.1
  • First release: May 14, 2017
  • Latest release: Sep 2, 2020
  • Number of updates: 19
  • Update frequency: every 63.5 days
  • Top authors: zeeshanx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /8,418 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
Install script ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼6.78ms] Passed 4 tests

A check of server-side resources used by OpenGraph Tags for Single Posts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.0140.92 ▼6.07
Dashboard /wp-admin3.58 ▼0.0552.31 ▼9.67
Posts /wp-admin/edit.php3.69 ▲0.0152.52 ▼1.25
Add New Post /wp-admin/post-new.php6.16 ▲0.0190.64 ▼10.11
Media Library /wp-admin/upload.php3.50 ▲0.0143.62 ▲0.48

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by OpenGraph Tags for Single Posts
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲4214.28 ▼0.121.78 ▼0.0144.15 ▲2.73
Dashboard /wp-admin2,209 ▲325.61 ▼0.0291.10 ▼2.5242.19 ▲3.61
Posts /wp-admin/edit.php2,114 ▲141.99 ▼0.0240.33 ▲5.9336.49 ▲0.82
Add New Post /wp-admin/post-new.php1,552 ▲1523.22 ▲0.23683.64 ▼23.7150.00 ▼7.11
Media Library /wp-admin/upload.php1,414 ▲144.24 ▲0.02100.08 ▼14.9644.54 ▼7.73

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fb-opengraph-tags/facebook-opengraph-tags.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Contributors: The plugin contributors field is not present
  • Screenshots: These screenshots lack descriptions #1, #2 in fb-opengraph-tags/assets to your readme.txt
You can take inspiration from this readme.txt

fb-opengraph-tags/facebook-opengraph-tags.php 85% from 13 tests

The principal PHP file in "OpenGraph Tags for Single Posts" v. 1.4 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("fb-opengraph-tags.php" instead of "facebook-opengraph-tags.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 274 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected66 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP171345
CSS12021

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
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%
Functions5
▷ Named functions5100.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
There are no PNG files in this plugin