10% open-data-viewer-for-austria

Code Review | Open Data Viewer for Austria

WordPress plugin Open Data Viewer for Austria scored10%from 54 tests.

About plugin

  • Plugin page: open-data-viewer-...
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Feb 15, 2013
  • Latest release: Apr 3, 2013
  • Number of updates: 53
  • Update frequency: every 0.9 days
  • Top authors: ondics (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,716 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/open-data-viewer-for-austria/ckanfunc.php+393
    Function create_function() is deprecated

Server metrics [RAM: ▼1.81MB] [CPU: ▼59.75ms] Passed 4 tests

Analyzing server-side resources used by Open Data Viewer for Austria
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.17 ▼1.296.14 ▼42.06
Dashboard /wp-admin2.19 ▼1.115.85 ▼50.43
Posts /wp-admin/edit.php2.19 ▼1.166.49 ▼48.50
Add New Post /wp-admin/post-new.php2.19 ▼3.696.55 ▼98.00
Media Library /wp-admin/upload.php2.19 ▼1.037.48 ▼30.97

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

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

Browser metrics Passed 4 tests

Open Data Viewer for Austria: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,106 ▲32015.44 ▲1.2630.38 ▲28.5938.31 ▼10.95
Dashboard /wp-admin2,196 ▲195.61 ▲0.0892.79 ▲2.0940.60 ▼2.22
Posts /wp-admin/edit.php2,271 ▲1716.79 ▲4.84122.17 ▲87.7237.81 ▲3.66
Add New Post /wp-admin/post-new.php6,525 ▲4,99926.89 ▲3.301,038.29 ▲424.8743.28 ▼9.91
Media Library /wp-admin/upload.php1,403 ▲64.23 ▲0.05109.51 ▲6.9448.24 ▲6.59

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/open-data-viewer-for-austria/ckanfunc.php+393
    Function create_function() is deprecated
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_ckanwidget
    • db_upgraded
    • widget_theysaidso_widget
    • 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)
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
Please fix the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/open-data-viewer-for-austria/formularshortcode.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/open-data-viewer-for-austria/formularwidget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/open-data-viewer-for-austria/ckanfunc.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
The official readme.txt might help

open-data-viewer-for-austria/ckanfunc.php 92% from 13 tests

The primary PHP file in "Open Data Viewer for Austria" version 1.0.7 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("open-data-viewer-for-austria.php" instead of "ckanfunc.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin47,617 lines of code in 102 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript708,7178,20939,645
LESS116413,938
CSS183391562,585
PHP71201321,126
HTML41823171
PO File26090152

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.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%
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
13 PNG files occupy 0.19MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
recline/css-site/images/icons/white.png1.40KB0.38KB▼ 73.18%
recline/vendor/leaflet/0.4.4/images/marker-icon.png2.46KB1.50KB▼ 38.98%
recline/vendor/leaflet/0.4.4/images/layers.png3.85KB0.78KB▼ 79.77%
recline/css-site/images/header-screen.png113.54KB38.83KB▼ 65.80%
recline/css-site/images/zigzags.png1.90KB0.85KB▼ 54.99%