73% jasperreports-io

Code Review | JasperReports IO

WordPress plugin JasperReports IO scored73%from 54 tests.

About plugin

  • Plugin page: jasperreports-io
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4
  • WordPress version: 6.3.1
  • First release: Apr 14, 2020
  • Latest release: Apr 16, 2020
  • Number of updates: 12
  • Update frequency: every 2.9 days
  • Top authors: tdanciu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /517 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼0.51MB] [CPU: ▼15.25ms] Passed 4 tests

Analyzing server-side resources used by JasperReports IO
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1641.88 ▲0.98
Dashboard /wp-admin3.47 ▲0.1745.01 ▼2.72
Posts /wp-admin/edit.php3.58 ▲0.2347.95 ▼1.57
Add New Post /wp-admin/post-new.php3.34 ▼2.5437.94 ▼57.67
Media Library /wp-admin/upload.php3.39 ▲0.1636.75 ▲1.30
JasperReports IO /wp-admin/options-general.php?page=jrio-settings-admin3.3630.84

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 27 new files
Database: 1 new table, 7 new options
New tables
wp_jrio_sessions
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
jrio_db_version
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

JasperReports IO: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8314.76 ▲0.181.99 ▲0.3143.15 ▲2.26
Dashboard /wp-admin2,210 ▲184.88 ▼0.11108.20 ▲3.1042.65 ▼0.31
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0439.89 ▼4.4134.85 ▼2.80
Add New Post /wp-admin/post-new.php1,517 ▼1117.69 ▼0.68631.44 ▲29.9349.63 ▼13.59
Media Library /wp-admin/upload.php1,392 ▲14.20 ▲0.0093.64 ▼1.9540.15 ▼3.23
JasperReports IO /wp-admin/options-general.php?page=jrio-settings-admin7812.0526.2025.92

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_jrio_sessions
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • jrio_db_version
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jasperreports-io/jrio-rest.php:306
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/jasperreports-io/jrio-options.php:161
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jasperreports-io/jrio-shortcodes.php:195
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/jasperreports-io/jrio.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jasperreports-io/jrio-session.php:141

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Please fix the following attributes: Please take inspiration from this readme.txt

jasperreports-io/jrio.php 85% from 13 tests

"JasperReports IO" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("jasperreports-io.php" instead of "jrio.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 156 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected2,079 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP102301931,154
JavaScript51294813
CSS4180105
HTML1007

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
4 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
viewer/expand.gray.png0.75KB0.55KB▼ 27.14%
viewer/close.white.png0.31KB0.25KB▼ 19.06%
viewer/close.gray.png0.50KB0.25KB▼ 49.41%
viewer/expand.white.png0.49KB0.55KB0.00%