67% task-assigner

Code Review | Task Assigner

WordPress plugin Task Assigner scored 67% from 54 tests.

About plugin

  • Plugin page: task-assigner
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0.1
  • WordPress version: 6.3.1
  • First release: Feb 4, 2015
  • Latest release: Feb 4, 2015
  • Number of updates: 6
  • Update frequency: every 0.5 days
  • Top authors: mithublue (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 830 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.80MB] [CPU: ▼32.37ms] Passed 4 tests

An overview of server-side resources used by Task Assigner
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1745.27 ▲6.20
Dashboard /wp-admin3.14 ▼0.1627.92 ▼27.05
Posts /wp-admin/edit.php3.14 ▼0.2224.76 ▼21.16
Add New Post /wp-admin/post-new.php3.14 ▼2.7524.58 ▼78.53
Media Library /wp-admin/upload.php3.14 ▼0.0931.42 ▼2.75
User Credits /wp-admin/edit.php?post_type=task&page=task-assigner/task_assigner.php3.1425.00
Task Submitted /wp-admin/edit.php?post_type=task&page=task_submitted3.1425.19
Add New Task /wp-admin/post-new.php?post_type=task3.1425.16
All Task /wp-admin/edit.php?post_type=task3.1429.53

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Task Assigner
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲18313.48 ▼1.101.78 ▼0.2342.21 ▼7.39
Dashboard /wp-admin2,277 ▲925.10 ▼0.79116.24 ▲13.9444.35 ▲4.07
Posts /wp-admin/edit.php2,175 ▲862.21 ▲0.2434.51 ▲0.4635.39 ▼0.37
Add New Post /wp-admin/post-new.php1,756 ▲24222.46 ▲4.79594.18 ▼92.3052.46 ▼6.27
Media Library /wp-admin/upload.php1,462 ▲744.29 ▲0.0797.33 ▼16.1346.46 ▼2.75
User Credits /wp-admin/edit.php?post_type=task&page=task-assigner/task_assigner.php8711.9325.9524.95
Task Submitted /wp-admin/edit.php?post_type=task&page=task_submitted9311.7625.3925.66
Add New Task /wp-admin/post-new.php?post_type=task3,0057.85174.0272.62
All Task /wp-admin/edit.php?post_type=task1,1392.3332.7228.62

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function map_meta_cap was called incorrectly. When checking for the edit_post capability, you must always check it against a specific post. Please see Debugging in WordPress for more information. (This message was added in version 6.1.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=task
    • > User notice in wp-includes/functions.php+5905
    Function map_meta_cap was called incorrectly. When checking for the edit_post capability, you must always check it against a specific post. Please see Debugging in WordPress for more information. (This message was added in version 6.1.0.)
    • > GET request to /wp-admin/post-new.php?post_type=task
    • > Notice in wp-content/plugins/task-assigner/task_assigner.php+246
    Undefined index: post_type

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/task-assigner/ajax.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/task-assigner/ajax.php: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)
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === task-assigner === )
  • Screenshots: Add descriptions for screenshots #6, #7, #8 in task-assigner/assets to your readme.txt
The official readme.txt might help

task-assigner/task_assigner.php 85% from 13 tests

The main PHP script in "Task Assigner" version 1.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("task-assigner.php" instead of "task_assigner.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin1,057 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP27048803
SVG100229
JavaScript20614
CSS30811

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity94.00
▷ Minimum class complexity94.00
▷ Maximum class complexity94.00
Average method complexity5.65
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin