72% io-plus

Code Review | IoPlus Contact Tracing Solution

WordPress plugin IoPlus Contact Tracing Solution scored 72% from 54 tests.

About plugin

  • Plugin page: io-plus
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 6.3.1
  • First release: Oct 1, 2020
  • Latest release: Oct 2, 2020
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: whassan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 749 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: ▲1.06MB] [CPU: ▲3.54ms] Passed 4 tests

Server-side resources used by IoPlus Contact Tracing Solution
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.50 ▲1.0445.61 ▲1.53
Dashboard /wp-admin4.35 ▲1.0451.94 ▲4.85
Posts /wp-admin/edit.php4.46 ▲1.1059.45 ▲8.97
Add New Post /wp-admin/post-new.php7.21 ▲1.3295.32 ▼1.18
Media Library /wp-admin/upload.php4.27 ▲1.0444.41 ▲11.25
Visitor /wp-admin/edit.php?post_type=io_plus_visitor4.3141.37
Dashboard /wp-admin/plugins.php?page=meta-box4.2641.12
IO Plus /wp-admin/admin.php?page=io_plus4.23176.02
Question /wp-admin/edit.php?post_type=io_plus_question4.3142.31
Business /wp-admin/edit.php?post_type=io_plus_business4.3142.13
Employee /wp-admin/edit.php?post_type=io_plus_employee4.3141.24

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 813 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
recovery_mode_email_last_sent
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for IoPlus Contact Tracing Solution
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,863 ▲12813.73 ▼0.851.71 ▼0.3941.99 ▼5.34
Dashboard /wp-admin2,257 ▲695.89 ▲0.81106.01 ▼6.6839.00 ▼9.36
Posts /wp-admin/edit.php2,143 ▲542.03 ▲0.0339.46 ▼3.4334.89 ▼2.04
Add New Post /wp-admin/post-new.php1,558 ▲2523.29 ▲0.23605.49 ▼31.7067.09 ▲18.73
Media Library /wp-admin/upload.php1,436 ▲514.24 ▲0.0797.87 ▼5.4343.14 ▲1.08
Visitor /wp-admin/edit.php?post_type=io_plus_visitor1,1131.9632.2430.14
Dashboard /wp-admin/plugins.php?page=meta-box1,3612.0625.6947.56
IO Plus /wp-admin/admin.php?page=io_plus7231.537.5217.40
Question /wp-admin/edit.php?post_type=io_plus_question1,1131.9532.8630.19
Business /wp-admin/edit.php?post_type=io_plus_business1,0951.9639.9228.86
Employee /wp-admin/edit.php?post_type=io_plus_employee1,1101.9830.7929.83

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • recovery_mode_email_last_sent
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=io_plus
    • > Error in wp-content/plugins/io-plus/src/query.php+86
    Uncaught Error: Cannot use object of type WP_Error as array in wp-content/plugins/io-plus/src/query.php:86
    Stack trace:
    #0 wp-content/plugins/io-plus/src/query.php(30): IO_Plus\Query->Request()
    #1 wp-content/plugins/io-plus/src/admin.php(62): IO_Plus\Query->activate()
    #2 wp-includes/class-wp-hook.php(310): IO_Plus\Admin->settings_page()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 {main}
    thrown

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 13× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/io-plus/vendor/fpdf/fpdf/original/tutorial/tuto5.php
    • > /wp-content/plugins/io-plus/vendor/rilwis/meta-box/inc/templates/audio.php
    • > /wp-content/plugins/io-plus/vendor/fpdf/fpdf/original/tutorial/tuto7.php
    • > /wp-content/plugins/io-plus/vendor/rilwis/meta-box/inc/templates/video.php
    • > /wp-content/plugins/io-plus/vendor/fpdf/fpdf/original/tutorial/tuto4.php
    • > /wp-content/plugins/io-plus/vendor/fpdf/fpdf/original/tutorial/makefont.php
    • > /wp-content/plugins/io-plus/vendor/fpdf/fpdf/original/tutorial/tuto1.php
    • > /wp-content/plugins/io-plus/vendor/fpdf/fpdf/original/tutorial/tuto3.php
    • > /wp-content/plugins/io-plus/vendor/fpdf/fpdf/original/tutorial/tuto2.php
    • > /wp-content/plugins/io-plus/vendor/rilwis/meta-box/inc/templates/media.php
  • 252× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'chillerlan\\QRCodeTest\\Data\\DatainterfaceTestAbstract' not found in wp-content/plugins/io-plus/vendor/chillerlan/php-qrcode/tests/Data/KanjiTest.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Field' not found in wp-content/plugins/io-plus/vendor/rilwis/meta-box/inc/fields/button.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Field' not found in wp-content/plugins/io-plus/vendor/rilwis/meta-box/inc/fields/image-select.php:11
    • > PHP Warning
      include(): Failed opening 'vendor/autoload.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/io-plus/vendor/hybridauth/hybridauth/examples/example_01.php on line 27
    • > PHP Fatal error
      Uncaught Error: Class 'Hybridauth\\Adapter\\AbstractAdapter' not found in wp-content/plugins/io-plus/vendor/hybridauth/hybridauth/src/Adapter/OAuth2.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Number_Field' not found in wp-content/plugins/io-plus/vendor/rilwis/meta-box/inc/fields/range.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Hybridauth\\Thirdparty\\OAuth\\OAuthSignatureMethod' not found in wp-content/plugins/io-plus/vendor/hybridauth/hybridauth/src/Thirdparty/OAuth/OAuthSignatureMethodHMACSHA1.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Select_Field' not found in wp-content/plugins/io-plus/vendor/rilwis/meta-box/inc/fields/select-advanced.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Input_Field' not found in wp-content/plugins/io-plus/vendor/rilwis/meta-box/inc/fields/switch.php:11
    • > PHP Fatal error
      require_once(): Failed opening required '../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/io-plus/vendor/chillerlan/php-qrcode/public/qrcode.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 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
8 plugin tags: covid-19 health-screening questionnaire, staff covid-19 contact tracing, business qr generator, visitor and employee health screening checklist, fit for work screening...

io-plus/plugin.php 92% from 13 tests

Analyzing the main PHP file in "IoPlus Contact Tracing Solution" version 1.0.0
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("io-plus.php" instead of "plugin.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin63,645 lines of code in 664 files:
LanguageFilesBlank linesComment linesLines of code
PHP3989,77524,87247,079
CSS468642735,834
JavaScript1021,0706733,934
HTML619803,378
PO File115145671,384
Markdown213200988
JSON800744
XML721152
YAML8273134
Bourne Shell14013
SVG1005

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
The following items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 106)
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity21.06
▷ Minimum class complexity1.00
▷ Maximum class complexity632.00
Average method complexity3.96
▷ Minimum method complexity1.00
▷ Maximum method complexity106.00
Code structure
Namespaces44
Interfaces9
Traits5
Classes294
▷ Abstract classes217.14%
▷ Concrete classes27392.86%
▷ Final classes51.83%
Methods2,141
▷ Static methods33415.60%
▷ Public methods1,79883.98%
▷ Protected methods28913.50%
▷ Private methods542.52%
Functions73
▷ Named functions5473.97%
▷ Anonymous functions1926.03%
Constants264
▷ Global constants4215.91%
▷ Class constants22284.09%
▷ Public constants21496.40%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
24 PNG files occupy 0.36MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/rilwis/meta-box/inc/about/images/online-generator.png10.94KB11.03KB0.00%
assets/img/success.png14.51KB4.97KB▼ 65.75%
vendor/rilwis/meta-box/img/jqueryui/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
vendor/rilwis/meta-box/img/jqueryui/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
assets/img/email_logo_white.png74.88KB39.66KB▼ 47.03%