88% open-graphite

Code Review | Open Graphite

WordPress plugin Open Graphite scored 88% from 54 tests.

About plugin

  • Plugin page: open-graphite
  • Plugin version: 1.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 5.9.2
  • First release: Jun 16, 2019
  • Latest release: Aug 21, 2021
  • Number of updates: 41
  • Update frequency: every 20.4 days
  • Top authors: mikeyott (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

6,000+ active / 64,271 total downloads

Benchmarks

Plugin footprint Passed 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.93MB] [CPU: ▼314.31ms] Passed 4 tests

An overview of server-side resources used by Open Graphite
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▼0.0447.67 ▼6.38
Dashboard /wp-admin3.45 ▲0.0435.74 ▲3.37
Posts /wp-admin/edit.php3.68 ▲0.0444.09 ▲6.56
Add New Post /wp-admin/post-new.php3.24 ▼3.7327.09 ▼1,249.84
Media Library /wp-admin/upload.php3.31 ▲0.0125.93 ▼4.38
Help /wp-admin/admin.php?page=open-graphite-help3.3725.65
Open Graphite /wp-admin/admin.php?page=open-graphite-settings3.5924.76

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 29 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Open Graphite: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,036 ▲28217.38 ▲1.455.87 ▼0.522.13 ▼0.29
Dashboard /wp-admin3,125 ▲2717.85 ▲1.69138.34 ▲9.13175.50 ▲12.28
Posts /wp-admin/edit.php2,961 ▲2734.66 ▲1.4280.41 ▲18.08154.98 ▲11.20
Add New Post /wp-admin/post-new.php1,926 ▲23620.87 ▲0.20406.58 ▼22.71206.95 ▲47.26
Media Library /wp-admin/upload.php1,731 ▲335.51 ▼0.02110.01 ▼30.70200.95 ▲16.98
Help /wp-admin/admin.php?page=open-graphite-help1,4504.2667.25144.84
Open Graphite /wp-admin/admin.php?page=open-graphite-settings2,7324.3271.15320.04

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=open-graphite-settings
    • > Notice in wp-content/plugins/open-graphite/inc/settings-ui.php+317
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/admin.php?page=open-graphite-settings
    • > Notice in wp-content/plugins/open-graphite/inc/settings-ui.php+359
    Undefined variable: license_link

SRP 50% from 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
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/open-graphite/_open_graphite.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/open-graphite/inc/preview-links.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: twitter, thumbnail, facebook, open graph, social

open-graphite/_open_graphite.php 92% from 13 tests

"Open Graphite" version 1.4.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("open-graphite.php" instead of "_open_graphite.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin3,421 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP7350621,343
PO File22922981,036
Sass1214101,030
SVG110011
CSS1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity56.00
▷ Minimum class complexity56.00
▷ Maximum class complexity56.00
Average method complexity14.75
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.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
2 PNG files occupy 0.21MB with 0.13MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/help/facebook-debugger.png185.70KB62.33KB▼ 66.43%
images/help/metabox.png33.15KB13.40KB▼ 59.57%