89% open-graph-headers-for-wp

Code Review | Open Graph Headers for WP

WordPress plugin Open Graph Headers for WP scored 89% from 54 tests.

About plugin

  • Plugin page: open-graph-header...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0.0
  • WordPress version: 6.3.1
  • First release: Oct 5, 2020
  • Latest release: Jul 9, 2022
  • Number of updates: 15
  • Update frequency: every 43.0 days
  • Top authors: alexlead (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 592 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Open Graph Headers for WP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.17 ▼3.23
Dashboard /wp-admin3.31 ▲0.0144.46 ▼2.24
Posts /wp-admin/edit.php3.36 ▲0.0043.85 ▼8.31
Add New Post /wp-admin/post-new.php5.89 ▲0.0098.54 ▼2.63
Media Library /wp-admin/upload.php3.23 ▲0.0034.54 ▲2.09

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Open Graph Headers for WP
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6613.23 ▼1.151.63 ▼0.2240.13 ▲2.61
Dashboard /wp-admin2,206 ▲544.87 ▼0.78109.45 ▲3.5641.78 ▼0.71
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0039.04 ▼2.5435.14 ▼0.26
Add New Post /wp-admin/post-new.php1,544 ▲218.52 ▲0.17597.27 ▼23.1059.51 ▲5.74
Media Library /wp-admin/upload.php1,388 ▼34.17 ▼0.0495.31 ▼5.4139.94 ▼5.56

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
You can look at the official readme.txt

open-graph-headers-for-wp/al_open_graph.php 85% from 13 tests

The main PHP script in "Open Graph Headers for WP" version 1.0.2 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("open-graph-headers-for-wp.php" instead of "al_open_graph.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 257 characters long)

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
Success! There were no dangerous files found in this plugin108 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP54061108

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods220.00%
▷ Protected methods00.00%
▷ Private methods880.00%
Functions1
▷ Named functions1100.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
1 compressed PNG file occupies 0.01MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png8.92KB8.40KB▼ 5.80%