84% ai-block

Code Review | AI Block

WordPress plugin AI Block scored84%from 54 tests.

About plugin

  • Plugin page: ai-block
  • Plugin version: 0.0.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.1
  • WordPress version: 6.3.1
  • First release: Mar 21, 2023
  • Latest release: Mar 25, 2023
  • Number of updates: 4
  • Update frequency: every 25.5 days
  • Top authors: blockify (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /259 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.01ms] Passed 4 tests

An overview of server-side resources used by AI Block
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.32 ▼3.96
Dashboard /wp-admin3.33 ▲0.0348.09 ▼4.53
Posts /wp-admin/edit.php3.38 ▲0.0351.49 ▲1.28
Add New Post /wp-admin/post-new.php5.87 ▼0.0196.39 ▲3.61
Media Library /wp-admin/upload.php3.25 ▲0.0336.89 ▲3.17

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for AI Block
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.29 ▼1.446.09 ▲4.1742.48 ▼1.85
Dashboard /wp-admin2,209 ▲264.80 ▼0.12111.09 ▼13.2937.66 ▼8.69
Posts /wp-admin/edit.php2,086 ▼32.05 ▲0.0338.88 ▲2.5534.19 ▼1.96
Add New Post /wp-admin/post-new.php6,201 ▲4,65722.95 ▲4.67883.74 ▲261.9351.90 ▼4.83
Media Library /wp-admin/upload.php1,388 ▲34.17 ▼0.10102.96 ▲4.1942.22 ▲0.82

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
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

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 no errors were found, this is by no means 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ai-block/ai-block.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
No tags were found

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

The entry point to "AI Block" version 0.0.2 is a PHP file that has certain tags in its header comment area
89 characters long description:
An intelligent block that helps you generate posts, pages or any kind of content with AI.

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
No dangerous file extensions were detected686 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript196102463
PHP21645101
CSS14489
JSON10033

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
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
Namespaces1
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 functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
There are no PNG files in this plugin