84% simple-open-graphs

Code Review | Simple Open Graphs

WordPress plugin Simple Open Graphs scored84%from 54 tests.

About plugin

  • Plugin page: simple-open-graphs
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.4.1
  • WordPress version: 6.3.1
  • First release: Jun 11, 2020
  • Latest release: Jun 11, 2020
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: webcodingplace (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /408 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼8.36ms] Passed 4 tests

This is a short check of server-side resources used by Simple Open Graphs
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.08 ▼9.41
Dashboard /wp-admin3.34 ▲0.0445.52 ▲0.75
Posts /wp-admin/edit.php3.39 ▲0.0344.47 ▼5.34
Add New Post /wp-admin/post-new.php5.92 ▲0.0381.22 ▼18.73
Media Library /wp-admin/upload.php3.26 ▲0.0334.37 ▲0.03
Simple Open Graphs /wp-admin/tools.php?page=simple-open-graphs3.2330.62

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Open Graphs
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.37 ▼1.014.44 ▲2.5042.45 ▲2.00
Dashboard /wp-admin2,213 ▲255.76 ▼0.1593.92 ▼7.3737.86 ▼2.24
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.1634.40 ▼1.4537.77 ▲3.11
Add New Post /wp-admin/post-new.php1,536 ▲2223.10 ▲5.42695.40 ▲31.5562.84 ▲9.69
Media Library /wp-admin/upload.php1,386 ▲44.22 ▲0.0492.25 ▼2.2741.15 ▼0.99
Simple Open Graphs /wp-admin/tools.php?page=simple-open-graphs7852.0425.0724.95

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/simple-open-graphs/metabox-fields.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/simple-open-graphs/metabox-fields.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-open-graphs/simple-open-graphs.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_types() in wp-content/plugins/simple-open-graphs/graphs-settings.php:7
    • > PHP Notice
      Trying to get property 'post_type' of non-object in wp-content/plugins/simple-open-graphs/metabox-fields.php on line 4

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: meta, facebook, open graph, fb meta, rich snippets

simple-open-graphs/simple-open-graphs.php Passed 13 tests

The primary PHP file in "Simple Open Graphs" version 1.0 is used by WordPress to initiate all plugin functionality
44 characters long description:
Easily add open graph meta tags in your site

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
Good job! No executable or dangerous file extensions detected247 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP43120230
JavaScript13217

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity3.89
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin