58% admin-todotastic

Code Review | Admin Todotastic

WordPress plugin Admin Todotastic scored 58% from 54 tests.

About plugin

  • Plugin page: admin-todotastic
  • Plugin version: 1.0
  • PHP compatiblity: 7.2.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 5.9.2
  • First release: Sep 3, 2021
  • Latest release: Sep 3, 2021
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: brickdots (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 144 total downloads


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
This plugin's installer ran successfully

Server metrics [RAM: ▲2.45MB] [CPU: ▼279.68ms] Passed 4 tests

An overview of server-side resources used by Admin Todotastic
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /5.96 ▲2.4463.62 ▲10.93
Dashboard /wp-admin5.87 ▲2.4652.36 ▲14.02
Posts /wp-admin/edit.php6.09 ▲2.4551.02 ▲10.78
Add New Post /wp-admin/post-new.php9.41 ▲2.44113.50 ▼1,149.17
Media Library /wp-admin/upload.php5.81 ▲2.5239.57 ▲8.76

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 2,488 new files
Database: 3 new tables, 1 new option
New tables
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Admin Todotastic
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,203 ▲44919.67 ▲3.9913.54 ▲7.102.30 ▼0.16
Dashboard /wp-admin3,171 ▲3138.42 ▲2.27157.23 ▲14.34179.94 ▲21.21
Posts /wp-admin/edit.php2,855 ▲1644.88 ▲1.6593.08 ▲28.22189.61 ▲47.73
Add New Post /wp-admin/post-new.php1,801 ▲11123.73 ▲2.42496.89 ▲28.93227.61 ▲71.39
Media Library /wp-admin/upload.php1,923 ▲2297.39 ▲1.89149.20 ▼102.87204.24 ▼19.40

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 3 tables in the database
    • wp_bdotstd_todo_statuses
    • wp_bdotstd_todo_mentions
    • wp_bdotstd_todos
  • The uninstall procedure has failed, leaving 1 option in the database
    • bdotstd_db_version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 29× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/admin-todotastic/vendor/wpnotes/utils/src/Localization.php
    • > /wp-content/plugins/admin-todotastic/vendor/wpnotes/utils/src/Assets.php
    • > /wp-content/plugins/admin-todotastic/inc/rest/TodoController.php
    • > /wp-content/plugins/admin-todotastic/vendor/illuminate/pagination/resources/views/bootstrap-4.blade.php
    • > /wp-content/plugins/admin-todotastic/index.php
    • > /wp-content/plugins/admin-todotastic/inc/view/dashboard/Board.php
    • > /wp-content/plugins/admin-todotastic/inc/view/metabox/Metabox.php
    • > /wp-content/plugins/admin-todotastic/vendor/wpnotes/utils/src/Activator.php
    • > /wp-content/plugins/admin-todotastic/inc/Core.php
    • > /wp-content/plugins/admin-todotastic/inc/Helpers/StrHelper.php
  • 885× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Illuminate\\Contracts\\Support\\Htmlable' not found in wp-content/plugins/admin-todotastic/vendor/illuminate/support/HtmlString.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Company' not found in wp-content/plugins/admin-todotastic/vendor/fzaninotto/faker/src/Faker/Provider/el_GR/Company.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function define() on null in wp-content/plugins/admin-todotastic/vendor/jgrossi/corcel/tests/database/factories/AttachmentFactory.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Support\\ServiceProvider' not found in wp-content/plugins/admin-todotastic/vendor/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Company' not found in wp-content/plugins/admin-todotastic/vendor/fzaninotto/faker/src/Faker/Provider/uk_UA/Company.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon\\Exceptions\\BadMethodCallException' not found in wp-content/plugins/admin-todotastic/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentConstructorException.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Payment' not found in wp-content/plugins/admin-todotastic/vendor/fzaninotto/faker/src/Faker/Provider/it_CH/Payment.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Doctrine\\Inflector\\GenericLanguageInflectorFactory' not found in wp-content/plugins/admin-todotastic/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Spanish/InflectorFactory.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\fr_FR\\Company' not found in wp-content/plugins/admin-todotastic/vendor/fzaninotto/faker/src/Faker/Provider/fr_CH/Company.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Payment' not found in wp-content/plugins/admin-todotastic/vendor/fzaninotto/faker/src/Faker/Provider/da_DK/Payment.php:5

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)
No browser issues were found


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: project management, task, todo, collaboration, woocommerce

admin-todotastic/index.php 92% from 13 tests

The main PHP file in "Admin Todotastic" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("admin-todotastic.php" instead of "index.php")

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Almost there! Just fix the following issues
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/admin-todotastic/vendor/nesbot/carbon/bin/carbon.bat
198,886 lines of code in 2,144 files:
LanguageFilesBlank linesComment linesLines of code
PO File13536
DOS Batch1004

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 140)
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity7.13
▷ Minimum class complexity1.00
▷ Maximum class complexity298.00
Average method complexity2.05
▷ Minimum method complexity1.00
▷ Maximum method complexity140.00
Code structure
▷ Abstract classes353.17%
▷ Concrete classes1,06896.83%
▷ Final classes787.30%
▷ Static methods1,51117.97%
▷ Public methods6,90682.15%
▷ Protected methods1,22814.61%
▷ Private methods2733.25%
▷ Named functions12212.55%
▷ Anonymous functions85087.45%
▷ Global constants3614.63%
▷ Class constants21085.37%
▷ Public constants20296.19%

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