10% aj-todo

Code Review | AJ TODO

WordPress plugin AJ TODO scored 10% from 54 tests.

About plugin

  • Plugin page: aj-todo
  • Plugin version: 1.3.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.3
  • WordPress version: 5.8.1
  • First release: Feb 5, 2020
  • Latest release: Mar 2, 2020
  • Number of updates: 8
  • Update frequency: every 3.4 days
  • Top authors: 2p1d (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 404 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/aj-todo/aj_todo.php+13
    date_default_timezone_set(): Timezone ID '' is invalid

Server metrics [RAM: ▼1.87MB] [CPU: ▼185.57ms] Passed 4 tests

A check of server-side resources used by AJ TODO
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /1.76 ▼1.073.90 ▼18.41
Dashboard /wp-admin1.78 ▼1.283.19 ▼43.17
Posts /wp-admin/edit.php1.78 ▼1.334.88 ▼28.92
Add New Post /wp-admin/post-new.php1.78 ▼3.664.75 ▼648.86
Media Library /wp-admin/upload.php1.78 ▼1.223.58 ▼21.34
Project /wp-admin/admin.php?page=ajtodo_admin_project1.783.92
Settings /wp-admin/admin.php?page=ajtodo_admin_setting1.783.77

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 213 new files
Database: 4 new tables, 2 new options
New tables
wp_ajtodo_projectkeys
wp_ajtodo_project
wp_ajtodo_link
wp_ajtodo_plan
New WordPress options
ajtodo_db_version
post_type_rules_flased_authors

Browser metrics Passed 4 tests

This is an overview of browser requirements for AJ TODO
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,834 ▲20718.08 ▲2.0822.31 ▲17.3292.60 ▲17.74
Dashboard /wp-admin2,975 ▲797.64 ▲1.41153.16 ▲23.44178.77 ▲4.86
Posts /wp-admin/edit.php2,786 ▲463.95 ▲0.7175.88 ▲12.47138.55 ▲4.08
Add New Post /wp-admin/post-new.php2,361 ▼1,45216.81 ▼2.10415.74 ▼30.56158.70 ▼2.87
Media Library /wp-admin/upload.php1,798 ▲466.76 ▲1.22137.44 ▼7.33180.71 ▼1.14
Project /wp-admin/admin.php?page=ajtodo_admin_project1,0593.4063.87101.93
Settings /wp-admin/admin.php?page=ajtodo_admin_setting1,2973.3566.71156.34

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/aj-todo/aj_todo.php+13
    date_default_timezone_set(): Timezone ID '' is invalid
  • The plugin did not uninstall successfully, leaving 4 tables in the database
    • wp_ajtodo_project
    • wp_ajtodo_link
    • wp_ajtodo_plan
    • wp_ajtodo_projectkeys
  • Zombie WordPress options detected upon uninstall: 2 options
    • post_type_rules_flased_authors
    • ajtodo_db_version

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ajtodo_admin_setting
    • > Notice in wp-content/plugins/aj-todo/aj_todo.php+13
    date_default_timezone_set(): Timezone ID '' is invalid
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ajtodo_admin_setting
    • > Notice in wp-content/plugins/aj-todo/admin/admin.basic.php+44
    Undefined variable: ajtodo_start_status_filter

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 48× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/aj-todo/admin/admin.team.project.menu.php:6
    • > PHP Warning
      Use of undefined constant AJTODO_PLUGIN_URL - assumed 'AJTODO_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/aj-todo/inc/ajtodo_core.php on line 24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/aj-todo/admin/admin.status.add.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/aj-todo/admin/admin.virtual.page.php:2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/aj-todo/inc/ajtodo_status_table.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/aj-todo/inc/ajtodo_js.php:6
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/aj-todo/inc/ajtodo_doc_table.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aj-todo/admin/ajtodo_admin_project_team.todo.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aj-todo/admin/admin.meta.box.php:2
    • > PHP Warning
      Use of undefined constant AJTODO_PLUGIN_IDEV - assumed 'AJTODO_PLUGIN_IDEV' (this will throw an Error in a future version of PHP) in wp-content/plugins/aj-todo/inc/ajtodo_core.php on line 23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% 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
Please fix the following attributes:
  • Donate link: Please fix this invalid url: ""
  • Screenshots: A description for screenshot #7 is missing in aj-todo/assets to your readme.txt
You can look at the official readme.txt

aj-todo/aj_todo.php 92% from 13 tests

"AJ TODO" version 1.3.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("aj-todo.php" instead of "aj_todo.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected162,194 lines of code in 169 files:
LanguageFilesBlank linesComment linesLines of code
JSON20058,693
CSS245,03010829,762
YAML40024,443
JavaScript352,9412,10716,577
SVG602413,703
PHP59596667,427
Sass18507344,669
LESS18504554,627
PO File31,1251,4342,293

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity28.35
▷ Minimum class complexity1.00
▷ Maximum class complexity132.00
Average method complexity3.08
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods263
▷ Static methods238.75%
▷ Public methods21280.61%
▷ Protected methods10.38%
▷ Private methods5019.01%
Functions105
▷ Named functions9489.52%
▷ Anonymous functions1110.48%
Constants23
▷ Global constants23100.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
There were not PNG files found in your plugin