10% task-randomizer

Code Review | Task Randomizer

WordPress plugin Task Randomizer scored10%from 54 tests.

About plugin

  • Plugin page: task-randomizer
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.4.2
  • WordPress version: 6.3.1
  • First release: Jul 5, 2020
  • Latest release: Jul 5, 2020
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: asergeev34 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /354 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/task-randomizer/task-randomizer.php+41
    Use of undefined constant p - assumed 'p' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.90MB] [CPU: ▼51.11ms] Passed 4 tests

A check of server-side resources used by Task Randomizer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.16 ▼39.95
Dashboard /wp-admin2.10 ▼1.206.05 ▼42.47
Posts /wp-admin/edit.php2.10 ▼1.257.45 ▼38.81
Add New Post /wp-admin/post-new.php2.10 ▼3.786.40 ▼83.20
Media Library /wp-admin/upload.php2.10 ▼1.125.25 ▼31.30

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Task Randomizer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.19 ▼1.201.76 ▲0.0044.99 ▲5.42
Dashboard /wp-admin2,203 ▲125.76 ▲0.8998.14 ▼4.6238.05 ▼3.04
Posts /wp-admin/edit.php2,089 ▼32.03 ▲0.0439.82 ▲0.2634.49 ▲0.34
Add New Post /wp-admin/post-new.php1,533 ▼023.19 ▼0.06661.76 ▼4.3852.09 ▼9.90
Media Library /wp-admin/upload.php1,388 ▼34.17 ▼0.0294.83 ▼1.3541.13 ▼3.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/task-randomizer/task-randomizer.php+41
    Use of undefined constant p - assumed 'p' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 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 Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: tasks, education, lms

task-randomizer/task-randomizer.php Passed 13 tests

The primary PHP file in "Task Randomizer" version 1.0.0 is used by WordPress to initiate all plugin functionality
114 characters long description:
Составление базы заданий и предъявление задания обучающемуся

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 plugin21,066 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
CSS61,4744113,014
JavaScript42,0261,6907,751
PHP726380297
Markdown1404

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity8.50
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods1990.48%
▷ Protected methods00.00%
▷ Private methods29.52%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin