74% corona-test-results

Code Review | Corona Test Results

WordPress plugin Corona Test Results scored74%from 54 tests.

About plugin

  • Plugin page: corona-test-results
  • Plugin version: 1.11.6
  • PHP compatiblity: 5.6.40+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.9.0
  • WordPress version: 6.3.1
  • First release: Mar 16, 2021
  • Latest release: Feb 16, 2022
  • Number of updates: 36
  • Update frequency: every 9.4 days
  • Top authors: 48design (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

40+ active /2,939 total downloads

Benchmarks

Plugin footprint 65% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.62MB] [CPU: ▲0.29ms] Passed 4 tests

Analyzing server-side resources used by Corona Test Results
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1241.71 ▲1.79
Dashboard /wp-admin4.14 ▲0.8351.33 ▲6.76
Posts /wp-admin/edit.php4.20 ▲0.8450.87 ▲0.55
Add New Post /wp-admin/post-new.php6.65 ▲0.7690.26 ▼7.89
Media Library /wp-admin/upload.php4.00 ▲0.7643.87 ▲6.72
Assign results /wp-admin/admin.php?page=corona-test-results3.9946.19
Register test /wp-admin/admin.php?page=corona-test-results-register3.9942.19
Settings /wp-admin/admin.php?page=corona-test-results-settings4.0041.40

Server storage [IO: ▲6.98MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 24 new files
Database: 1 new table, 8 new options
New tables
wp_va_testresults
New WordPress options
corona_test_results_options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
corona_test_results_activationtime
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Corona Test Results
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲10713.21 ▼1.091.75 ▼0.0344.71 ▼0.18
Dashboard /wp-admin2,248 ▲605.88 ▲0.9599.18 ▼6.0038.15 ▼5.63
Posts /wp-admin/edit.php2,131 ▲422.08 ▲0.0238.03 ▼4.0331.73 ▼4.12
Add New Post /wp-admin/post-new.php1,556 ▲4223.13 ▲5.70685.03 ▲11.5656.07 ▼2.53
Media Library /wp-admin/upload.php1,433 ▲454.26 ▲0.0599.43 ▼18.1341.48 ▼8.96
Assign results /wp-admin/admin.php?page=corona-test-results9779.60259.9529.64
Register test /wp-admin/admin.php?page=corona-test-results-register1,0959.49243.6341.70
Settings /wp-admin/admin.php?page=corona-test-results-settings1,59412.85290.3737.50

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_va_testresults
  • This plugin does not fully uninstall, leaving 8 options in the database
    • db_upgraded
    • corona_test_results_activationtime
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • corona_test_results_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Almost there! Just fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/corona-test-results/lib/DataEncryption.class.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHWPINC/sodium_compat/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/corona-test-results/lib/DataEncryption.class.php on line 2
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/corona-test-results/lib/DataEncryption.class.php on line 2
    • > PHP Warning
      require_once(ABSPATHWPINC/sodium_compat/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/corona-test-results/lib/DataEncryption.class.php on line 2

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
You can take inspiration from this readme.txt

corona-test-results/corona-test-results.php 92% from 13 tests

The entry point to "Corona Test Results" version 1.11.6 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 629 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
There were no executable files found in this plugin7,250 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP98246403,966
JavaScript6222661,723
PO File13896501,560
SVG1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity19.50
▷ Minimum class complexity16.00
▷ Maximum class complexity23.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods16
▷ Static methods1062.50%
▷ Public methods850.00%
▷ Protected methods00.00%
▷ Private methods850.00%
Functions171
▷ Named functions15791.81%
▷ Anonymous functions148.19%
Constants6
▷ Global constants6100.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
PNG images were not found in this plugin