84% roam-block

Code Review | Roam Research Block

WordPress plugin Roam Research Block scored 84% from 54 tests.

About plugin

  • Plugin page: roam-block
  • Plugin version: 0.1.3
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.1-5.3.1
  • WordPress version: 6.3.1
  • First release: Jan 5, 2021
  • Latest release: Jan 27, 2021
  • Number of updates: 4
  • Update frequency: every 5.8 days
  • Top authors: artpi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 466 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 gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.97ms] Passed 4 tests

This is a short check of server-side resources used by Roam Research Block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.25 ▼2.44
Dashboard /wp-admin3.31 ▲0.0144.36 ▼4.25
Posts /wp-admin/edit.php3.36 ▲0.0144.98 ▲1.50
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.14 ▼6.67
Media Library /wp-admin/upload.php3.23 ▲0.0137.65 ▲2.55

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Roam Research Block: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲1313.21 ▼0.031.69 ▼0.1141.44 ▼1.91
Dashboard /wp-admin2,203 ▼65.80 ▼0.0695.36 ▲1.1638.87 ▲1.97
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0540.61 ▲6.6834.46 ▼0.46
Add New Post /wp-admin/post-new.php6,587 ▲5,06829.31 ▲6.19970.08 ▲355.1464.98 ▲11.56
Media Library /wp-admin/upload.php1,388 ▼04.22 ▼0.06107.04 ▼2.0745.37 ▼1.56

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

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)
Even though everything seems fine, this is not an exhaustive test

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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Artpi\\RoamBlock\\add_action() in wp-content/plugins/roam-block/endpoints.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/roam-block/roam-block.php:68

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
1 plugin tags: block

roam-block/roam-block.php Passed 13 tests

The main PHP file in "Roam Research Block" ver. 0.1.3 adds more information about the plugin and also serves as the entry point for this plugin
66 characters long description:
Embed Roam Blocks or pages in WordPress, just as you would in Roam

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected1,514 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP43931401,461
JSON20031
XML12016
JavaScript2294
CSS2002

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity186.00
▷ Minimum class complexity186.00
▷ Maximum class complexity186.00
Average method complexity4.56
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods52
▷ Static methods35.77%
▷ Public methods815.38%
▷ Protected methods4484.62%
▷ Private methods00.00%
Functions13
▷ Named functions1292.31%
▷ Anonymous functions17.69%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin