83% sortable-block

Code Review | Sortable - Simple Events by Date Manager Block

WordPress plugin Sortable - Simple Events by Date Manager Block scored83%from 54 tests.

About plugin

  • Plugin page: sortable-block
  • Plugin version: 1.7.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.3
  • WordPress version: 6.3.1
  • First release: Dec 21, 2022
  • Latest release: Oct 12, 2023
  • Number of updates: 23
  • Update frequency: every 12.8 days
  • Top authors: taskotr (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /901 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.88ms] Passed 4 tests

An overview of server-side resources used by Sortable - Simple Events by Date Manager Block
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0939.30 ▲1.82
Dashboard /wp-admin3.37 ▲0.0344.72 ▼17.33
Posts /wp-admin/edit.php3.42 ▲0.0743.60 ▼3.72
Add New Post /wp-admin/post-new.php5.96 ▲0.0884.94 ▼4.29
Media Library /wp-admin/upload.php3.29 ▲0.0636.65 ▲3.48

Server storage [IO: ▲0.07MB] [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: 20 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Sortable - Simple Events by Date Manager Block
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲5214.35 ▲0.031.70 ▼0.1144.46 ▲3.38
Dashboard /wp-admin2,192 ▲125.57 ▼0.0882.41 ▼8.5741.97 ▲0.77
Posts /wp-admin/edit.php2,097 ▼32.01 ▲0.0134.09 ▼3.0133.43 ▼3.00
Add New Post /wp-admin/post-new.php6,683 ▲5,15422.37 ▼1.20886.10 ▲214.5737.84 ▼21.85
Media Library /wp-admin/upload.php1,394 ▼64.19 ▼0.0198.64 ▲3.1542.80 ▲0.42

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
Please fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/sortable-block/patterns/mentions-example-1.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/sortable-block/sortable.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/sortable-block/patterns/changelog-example-1.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (This image displays the search results in the Block Inserter when the keyword “Sortable” is entered. It also shows pre-made block patterns associated with the keyword below the search.), #2 (This image demonstrates the Sortable block being added to the content area after selecting it from the Block Inserter. Note, the Block Inserter can also be closed using the top bar.), #3 (This image displays a placeholder screen for the Sortable block, allowing to either select a pre-designed pattern based on Sortable or start blank.), #4 (This image displays three variations to start blank: Empty, Grid View, List View. Each option offers a starting layout, including a pre-made content.), #5 (This image showcases the Sortable block with pre-made content arranged in a list layout, with active List View layout.), #6 (This image showcases the Sortable block with pre-made content arranged in a grid layout, with active Grid View layout. Note, this layout also offers Layout settings that allow configuring the number of columns.), #7 (This image showcases the Sortable block with no content, displaying only the ‘Add Sortable Entry‘ button for adding events to manage. Note, by default, the Sortable block adopts the List View layout.), #8 (This image displays a Sortable Entry block (as a child) with empty content within the Sortable block (as a parent). A Sortable Entry is an event that can be sorted by date within the Sortable block, serving as a container for an event layout that can be built with WordPress blocks.), #9 (This image displays a Sortable Entry block with the ‘Add Block‘ button clicked, revealing a modal showcasing common blocks with an option to view more available blocks for creating an event layout.), #10 (This image displays a Sortable Entry block with the active Block settings sidebar. In the sidebar, the Date settings section is shown for configuring the time and date of the event.)
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

sortable-block/sortable.php 85% from 13 tests

The primary PHP file in "Sortable - Simple Events by Date Manager Block" version 1.7.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("sortable-block.php" instead of "sortable.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 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin476 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP62680300
JSON300168
CSS6105
JavaScript3003

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants2
▷ Global constants2100.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 were not PNG files found in your plugin