84% image-licensing-schema

Code Review | Image Licensing Schema – Structured Data for Google Images

WordPress plugin Image Licensing Schema – Structured Data for Google Images scored84%from 54 tests.

About plugin

  • Plugin page: image-licensing-s...
  • Plugin version: 1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.1
  • WordPress version: 6.3.1
  • First release: Oct 2, 2020
  • Latest release: Oct 26, 2022
  • Number of updates: 30
  • Update frequency: every 25.2 days
  • Top authors: audrasjb (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active /2,545 total downloads

Benchmarks

Plugin footprint 82% 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 successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Image Licensing Schema – Structured Data for Google Images
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1146.69 ▲7.01
Dashboard /wp-admin3.42 ▲0.1152.61 ▼0.44
Posts /wp-admin/edit.php3.47 ▲0.1150.10 ▼3.12
Add New Post /wp-admin/post-new.php6.00 ▲0.1190.91 ▼14.10
Media Library /wp-admin/upload.php3.34 ▲0.1138.71 ▲1.77

Server storage [IO: ▲0.07MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
These are issues you should consider
  • The plugin illegally modified 1 file (4.00KB) outside of "wp-content/plugins/image-licensing-schema/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Image Licensing Schema – Structured Data for Google Images
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.78 ▲0.362.17 ▲0.2242.76 ▼1.13
Dashboard /wp-admin2,221 ▲215.80 ▼0.05100.88 ▼2.8442.02 ▼0.71
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0233.86 ▼5.5235.44 ▼0.65
Add New Post /wp-admin/post-new.php6,221 ▲4,69026.23 ▲3.20932.90 ▲289.9054.68 ▲3.12
Media Library /wp-admin/upload.php1,394 ▼64.23 ▲0.0197.08 ▼5.8342.27 ▼2.47

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/image-licensing-schema/image-licensing-schema.php:46

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: licensing, schemaorg, google images, schema, structured data...

image-licensing-schema/image-licensing-schema.php Passed 13 tests

The main PHP file in "Image Licensing Schema – Structured Data for Google Images" ver. 1.3 adds more information about the plugin and also serves as the entry point for this plugin
68 characters long description:
Provide Image Licensing Schema.org structured data for Google Images

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin569 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP22831548
CSS10011
JavaScript15010

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.22
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%
Functions12
▷ Named functions12100.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 images were found in this plugin