84% insert-post-block

Code Review | Insert Post Block

WordPress plugin Insert Post Block scored 84% from 54 tests.

About plugin

  • Plugin page: insert-post-block
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: WordPress 5.3-5.6
  • WordPress version: 6.3.1
  • First release: Dec 5, 2020
  • Latest release: Dec 5, 2020
  • Number of updates: 3
  • Update frequency: every 3.3 days
  • Top authors: mahdiyazdani (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 446 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.90ms] Passed 4 tests

An overview of server-side resources used by Insert Post Block
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.40 ▼7.95
Dashboard /wp-admin3.35 ▲0.0445.44 ▼3.23
Posts /wp-admin/edit.php3.40 ▲0.0450.42 ▲3.55
Add New Post /wp-admin/post-new.php5.93 ▲0.0483.11 ▼6.39
Media Library /wp-admin/upload.php3.27 ▲0.0436.69 ▲1.97

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

Browser metrics Passed 4 tests

Insert Post Block: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.20 ▼1.091.63 ▼0.0840.78 ▼8.81
Dashboard /wp-admin2,206 ▲185.83 ▲0.91105.66 ▲0.9239.05 ▼2.78
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0139.45 ▼1.3635.25 ▲0.89
Add New Post /wp-admin/post-new.php6,425 ▲4,91123.70 ▲6.23892.75 ▲202.9167.33 ▲8.69
Media Library /wp-admin/upload.php1,382 ▼34.19 ▲0.0199.10 ▼3.1843.50 ▼0.17

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Blocks_Controller' not found in wp-content/plugins/insert-post-block/includes/class-insert-post-block-reusable-controller.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/insert-post-block/insert-post-block.php:38

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
8 plugin tags: blocks, post, embed, shortcode, block-editor...

insert-post-block/insert-post-block.php 85% from 13 tests

The main PHP script in "Insert Post Block" version 1.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Requires at least: Required version number formatted incorrectly (ex. "7.0" instead of "WordPress 5.3")
  • Requires PHP: The required version number did not match the one declared in readme.txt ("7.2" instead of "7.2.0")

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 detected124 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP534166121
JavaScript1012
CSS1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods10
▷ Static methods110.00%
▷ Public methods880.00%
▷ Protected methods220.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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
No PNG images were found in this plugin