77% wonderm00ns-simple-facebook-open-graph-tags

Code Review | Open Graph and Twitter Card Tags

WordPress plugin Open Graph and Twitter Card Tags scored77%from 54 tests.

About plugin

  • Plugin page: wonderm00ns-simpl...
  • Plugin version: 3.3.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Oct 16, 2011
  • Latest release: Nov 29, 2023
  • Number of updates: 282
  • Update frequency: every 15.7 days
  • Top authors: webdados (70.57%)wonderm00n (26.24%)wpexpertsio (3.9%)

Code review

54 tests

User reviews

118 reviews

Install metrics

70,000+ active /1,938,547 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.18MB] [CPU: ▲0.44ms] Passed 4 tests

This is a short check of server-side resources used by Open Graph and Twitter Card Tags
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2942.43 ▲0.83
Dashboard /wp-admin3.47 ▲0.1746.56 ▼2.11
Posts /wp-admin/edit.php3.58 ▲0.2347.50 ▼2.19
Add New Post /wp-admin/post-new.php6.05 ▲0.1791.10 ▲8.71
Media Library /wp-admin/upload.php3.39 ▲0.1634.54 ▲5.21

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
wonderm00n_open_graph_version
theysaidso_admin_options
widget_recent-posts
wonderm00n_open_graph_settings
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Open Graph and Twitter Card Tags: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7814.37 ▲0.011.64 ▼0.0837.96 ▼5.88
Dashboard /wp-admin2,199 ▲195.60 ▼0.0190.75 ▼8.2240.15 ▼5.62
Posts /wp-admin/edit.php2,104 ▲41.94 ▼0.0141.21 ▲0.7038.13 ▲6.36
Add New Post /wp-admin/post-new.php6,267 ▲4,73818.96 ▼3.95868.87 ▲301.3854.73 ▲3.17
Media Library /wp-admin/upload.php1,401 ▲44.18 ▼0.0495.20 ▼3.9640.05 ▼1.29
Open Graph and Twitter Card Tags /wp-admin/class-webdados-fb-open-graph-admin.php260.410.0913.37

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • wonderm00n_open_graph_version
    • theysaidso_admin_options
    • wonderm00n_open_graph_settings
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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 errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wonderm00ns-simple-facebook-open-graph-tags/admin/options-page-right.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/class-webdados-fb-open-graph-admin.php
    • > Network (severe)
    wp-admin/class-webdados-fb-open-graph-admin.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 19 tag instead of maximum 10
You can look at the official readme.txt

wonderm00ns-simple-facebook-open-graph-tags/wonderm00n-open-graph.php 85% from 13 tests

The principal PHP file in "Open Graph and Twitter Card Tags" v. 3.3.2 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 186 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("wonderm00ns-simple-facebook-open-graph-tags.php" instead of "wonderm00n-open-graph.php")

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
No dangerous file extensions were detected5,446 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP153424303,389
XML1001,631
JavaScript12412273
CSS1105111
JSON10042

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 259)
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity148.33
▷ Minimum class complexity28.00
▷ Maximum class complexity354.00
Average method complexity9.67
▷ Minimum method complexity1.00
▷ Maximum method complexity259.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods51
▷ Static methods00.00%
▷ Public methods4078.43%
▷ Protected methods00.00%
▷ Private methods1121.57%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin