84% wp-og

Code Review | Open Graph Tags

WordPress plugin Open Graph Tags scored 84% from 54 tests.

About plugin

  • Plugin page: wp-og
  • Plugin version: 0.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.3.1
  • WordPress version: 5.8.1
  • First release: Oct 22, 2015
  • Latest release: Nov 1, 2015
  • Number of updates: 10
  • Update frequency: every 1.0 days
  • Top authors: filipstefansson (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

600+ active / 6,730 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼143.00ms] Passed 4 tests

A check of server-side resources used by Open Graph Tags
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.1845.59 ▲20.06
Dashboard /wp-admin3.21 ▲0.1652.74 ▼0.48
Posts /wp-admin/edit.php3.26 ▲0.1649.58 ▼2.41
Add New Post /wp-admin/post-new.php5.49 ▲0.0696.04 ▼572.72
Media Library /wp-admin/upload.php3.07 ▲0.0738.73 ▲3.63
Open Graph Tags /wp-admin/options-general.php?page=wp-og3.0936.34

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 24 new files
Database: no new tables, 3 new options
New WordPress options
og-description
og-post_types
og-site_name

Browser metrics Passed 4 tests

An overview of browser requirements for Open Graph Tags
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,911 ▲31517.28 ▲1.4110.16 ▲0.3052.18 ▲1.99
Dashboard /wp-admin3,175 ▲2417.99 ▲2.06169.59 ▲23.75114.97 ▼7.15
Posts /wp-admin/edit.php2,970 ▲2314.27 ▲1.5790.63 ▲15.9388.38 ▼0.43
Add New Post /wp-admin/post-new.php1,729 ▲4621.26 ▲2.57262.56 ▼139.22140.51 ▲29.79
Media Library /wp-admin/upload.php1,816 ▲94.66 ▼0.38125.94 ▼33.34125.47 ▼2.39
Open Graph Tags /wp-admin/options-general.php?page=wp-og1,6283.38102.4483.52

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 3 options in the database
    • og-description
    • og-post_types
    • og-site_name

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_types() in wp-content/plugins/wp-og/admin/partials/wp-og-admin-display.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/wp-og/admin/partials/wp-og-meta-box.php:19

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 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The UI), #2 (What it looks like on Facebook)
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
Please take inspiration from this readme.txt

wp-og/wp-og.php Passed 13 tests

The primary PHP file in "Open Graph Tags" version 0.1.2 is used by WordPress to initiate all plugin functionality
86 characters long description:
A WordPress plugin that let's you create and edit Open Graph Tags™ for your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected598 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP10139518445
PO File1273588
JavaScript15844
Markdown17016
CSS1315

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity5.50
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity1.79
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods34
▷ Static methods12.94%
▷ Public methods2985.29%
▷ Protected methods00.00%
▷ Private methods514.71%
Functions2
▷ Named functions2100.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
No PNG files were detected