84% generate-wpgraphql-image-dataurl

Code Review | Generate WpGraphql Image DataUrl

WordPress plugin Generate WpGraphql Image DataUrl scored 84% from 54 tests.

About plugin

  • Plugin page: generate-wpgraphq...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Feb 1, 2022
  • Latest release: Feb 1, 2022
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: dipankarmaikap (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 832 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.54ms] Passed 4 tests

An overview of server-side resources used by Generate WpGraphql Image DataUrl
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.46 ▼4.54
Dashboard /wp-admin3.32 ▲0.0246.24 ▼1.37
Posts /wp-admin/edit.php3.37 ▲0.0150.08 ▼1.54
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.33 ▼5.04
Media Library /wp-admin/upload.php3.24 ▲0.0132.49 ▼3.02

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Generate WpGraphql Image DataUrl
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5713.15 ▼1.521.48 ▼0.6043.58 ▼2.61
Dashboard /wp-admin2,217 ▲264.93 ▲0.07188.90 ▲84.1475.97 ▲35.67
Posts /wp-admin/edit.php2,103 ▲141.98 ▼0.0740.05 ▲2.2335.98 ▲1.24
Add New Post /wp-admin/post-new.php1,526 ▲717.67 ▼5.69656.51 ▼36.1760.44 ▲1.11
Media Library /wp-admin/upload.php1,405 ▲204.21 ▲0.0395.98 ▼6.0541.93 ▼4.77

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/generate-wpgraphql-image-dataurl/wp-graphql-image-dataurl.php:16

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 96% from 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
7 plugin tags: wpgraphql, base64, decoupled wordpress, jamstack, headless wordpress...

generate-wpgraphql-image-dataurl/wp-graphql-image-dataurl.php 92% from 13 tests

The primary PHP file in "Generate WpGraphql Image DataUrl" version 1.0.2 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("generate-wpgraphql-image-dataurl.php" instead of "wp-graphql-image-dataurl.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin140 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
Markdown123096
PHP171244

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.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