84% structured-data-google

Code Review | Structured data Google

WordPress plugin Structured data Google scored84%from 54 tests.

About plugin

  • Plugin page: structured-data-g...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-5.2.1
  • WordPress version: 6.3.1
  • First release: Jun 16, 2019
  • Latest release: Jun 17, 2019
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: scriptcoil (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /458 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼3.03ms] Passed 4 tests

This is a short check of server-side resources used by Structured data Google
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1245.53 ▼1.31
Dashboard /wp-admin3.41 ▲0.1047.78 ▼0.33
Posts /wp-admin/edit.php3.52 ▲0.1654.28 ▲5.40
Add New Post /wp-admin/post-new.php5.99 ▲0.1082.79 ▼12.24
Media Library /wp-admin/upload.php3.33 ▲0.1034.31 ▲1.75
Local business /wp-admin/admin.php?page=gsd-local3.3339.68
Google Structured data /wp-admin/admin.php?page=gsd3.3337.22

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Structured data Google: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲11713.36 ▼1.321.83 ▼0.0642.20 ▼1.50
Dashboard /wp-admin2,233 ▲454.86 ▼1.05100.97 ▼3.1739.15 ▲1.15
Posts /wp-admin/edit.php2,119 ▲302.02 ▲0.0138.28 ▼1.4935.76 ▼1.15
Add New Post /wp-admin/post-new.php1,564 ▲4518.23 ▼4.99700.29 ▲99.9357.68 ▲3.06
Media Library /wp-admin/upload.php1,418 ▲334.19 ▼0.0195.44 ▼8.2542.48 ▼1.60
Local business /wp-admin/admin.php?page=gsd-local1,2643.1037.4624.39
Google Structured data /wp-admin/admin.php?page=gsd1,0663.0438.3924.77

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
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function gsd\\plugin_dir_url() in wp-content/plugins/structured-data-google/structured-data-google.php:19

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 errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: structured business data, structured data, structured maps data, structured data google

structured-data-google/structured-data-google.php 92% from 13 tests

The entry point to "Structured data Google" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Everything looks great! No dangerous files found in this plugin594 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP816324491
PO File1292976
JavaScript115021
CSS1006

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.69
Average class complexity10.43
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity5.33
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces7
Interfaces0
Traits5
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods1292.31%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin