84% opendata-generator

Code Review | OpenData Generator

WordPress plugin OpenData Generator scored84%from 54 tests.

About plugin

  • Plugin page: opendata-generator
  • Plugin version: 3.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.2-4.3.2
  • WordPress version: 6.3.1
  • First release: Dec 3, 2015
  • Latest release: Apr 17, 2016
  • Number of updates: 5
  • Update frequency: every 27.6 days
  • Top authors: hideokamoto (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /632 total downloads

Benchmarks

Plugin footprint 83% 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 gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼4.50ms] Passed 4 tests

Analyzing server-side resources used by OpenData Generator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0943.53 ▲1.13
Dashboard /wp-admin3.40 ▲0.0947.65 ▼9.78
Posts /wp-admin/edit.php3.51 ▲0.1545.61 ▼1.46
Add New Post /wp-admin/post-new.php5.98 ▲0.0985.15 ▼7.87
Media Library /wp-admin/upload.php3.32 ▲0.0936.23 ▲2.18
Create Mapping /wp-admin/post-new.php?post_type=opendata-generator3.3843.05
Schema Settings /wp-admin/admin.php?page=odg-schema3.2933.03
Opendata Generator /wp-admin/admin.php?page=odg-admin-menu3.2831.28
Mapping List /wp-admin/edit.php?post_type=opendata-generator3.3635.25

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for OpenData Generator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲7414.25 ▼0.111.73 ▲0.0744.20 ▲1.03
Dashboard /wp-admin2,220 ▲435.52 ▼0.0685.93 ▼17.7240.21 ▼2.36
Posts /wp-admin/edit.php2,134 ▲342.02 ▲0.0337.69 ▲1.4133.34 ▼3.14
Add New Post /wp-admin/post-new.php1,551 ▲2523.36 ▲0.20684.43 ▼1.5761.62 ▲10.59
Media Library /wp-admin/upload.php1,431 ▲314.21 ▼0.07104.82 ▼2.0344.46 ▼3.04
Create Mapping /wp-admin/post-new.php?post_type=opendata-generator1,5792.5850.3546.44
Schema Settings /wp-admin/admin.php?page=odg-schema8302.0122.9245.54
Opendata Generator /wp-admin/admin.php?page=odg-admin-menu8511.9921.6037.08
Mapping List /wp-admin/edit.php?post_type=opendata-generator1,0921.9732.0730.05

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • 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)
Everything seems fine, however this is by no means 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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/opendata-generator/opendata-generator.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: Screenshot #1 (No Images) image not found
The official readme.txt is a good inspiration

opendata-generator/opendata-generator.php Passed 13 tests

"OpenData Generator" version 3.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
75 characters long description:
This Plugin can make jsonld for Linked Open Data. Using CustomField Plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected393 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP74164393

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity6.29
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity2.48
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods2080.00%
▷ Protected methods00.00%
▷ Private methods520.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin