84% todo-block

Code Review | Todo Block

WordPress plugin Todo Block scored84%from 54 tests.

About plugin

  • Plugin page: todo-block
  • Plugin version: 1.0.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Jan 7, 2022
  • Latest release: May 21, 2023
  • Number of updates: 8
  • Update frequency: every 62.5 days
  • Top authors: davexpression (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,799 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.96ms] Passed 4 tests

A check of server-side resources used by Todo Block
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.06 ▲1.51
Dashboard /wp-admin3.33 ▲0.0343.94 ▼2.76
Posts /wp-admin/edit.php3.39 ▲0.0348.69 ▼1.83
Add New Post /wp-admin/post-new.php5.92 ▲0.0487.10 ▼7.51
Media Library /wp-admin/upload.php3.26 ▲0.0334.72 ▲0.26

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Todo Block
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲6814.45 ▲0.071.78 ▼0.0740.43 ▼7.86
Dashboard /wp-admin2,203 ▲125.77 ▲0.90108.09 ▼6.6436.53 ▼11.41
Posts /wp-admin/edit.php2,092 ▼01.99 ▼0.0139.26 ▲1.4135.85 ▲2.37
Add New Post /wp-admin/post-new.php6,419 ▲4,90028.41 ▲5.48891.88 ▲228.1438.00 ▼14.27
Media Library /wp-admin/upload.php1,385 ▼34.20 ▲0.0295.57 ▼11.1543.52 ▼0.82

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/todo-block/todo-block.php:23

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
1 plugin tags: block

todo-block/todo-block.php 92% from 13 tests

Analyzing the main PHP file in "Todo Block" version 1.0.7
You should first fix the following items:
  • 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 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected37,863 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JSON40037,803
PHP4199456
CSS2002
JavaScript2002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods685.71%
▷ Protected methods00.00%
▷ Private methods114.29%
Functions0
▷ Named functions00.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
No PNG files were detected