74% open-brain

Code Review | OPEN-BRAIN

WordPress plugin OPEN-BRAIN scored74%from 54 tests.

About plugin

  • Plugin page: open-brain
  • Plugin version: 0.5.0
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0.0-6.1
  • WordPress version: 6.3.1
  • First release: Feb 24, 2023
  • Latest release: Mar 2, 2023
  • Number of updates: 7
  • Update frequency: every 0.9 days
  • Top authors: faridsaniee (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /221 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.55MB] [CPU: ▼18.15ms] Passed 4 tests

A check of server-side resources used by OPEN-BRAIN
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0839.92 ▼7.94
Dashboard /wp-admin3.45 ▲0.1554.21 ▼1.36
Posts /wp-admin/edit.php3.57 ▲0.2155.79 ▼0.32
Add New Post /wp-admin/post-new.php3.32 ▼2.5742.25 ▼62.97
Media Library /wp-admin/upload.php3.38 ▲0.1545.40 ▲5.68
Image /wp-admin/admin.php?page=open_brain_image3.3435.40
Content /wp-admin/admin.php?page=open_brain_content3.3434.05
Settings /wp-admin/admin.php?page=open-brain3.3433.73

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
open-brain-plugin
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by OPEN-BRAIN
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲8014.10 ▼0.251.67 ▼0.2141.01 ▼3.46
Dashboard /wp-admin2,245 ▲685.67 ▲0.0196.09 ▲7.2941.87 ▼7.39
Posts /wp-admin/edit.php2,152 ▲492.04 ▲0.0541.47 ▲1.5138.96 ▼1.84
Add New Post /wp-admin/post-new.php1,564 ▲3218.61 ▼4.56632.80 ▼67.3361.63 ▼3.58
Media Library /wp-admin/upload.php1,452 ▲494.29 ▲0.07100.33 ▼9.9941.41 ▼6.86
Image /wp-admin/admin.php?page=open_brain_image9671.6924.9931.32
Content /wp-admin/admin.php?page=open_brain_content1,0711.6632.6128.25
Settings /wp-admin/admin.php?page=open-brain9481.6826.7825.71

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'open_brain_plugin' does not have a method 'uninstall'
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • open-brain-plugin
    • widget_recent-posts
    • 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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/open-brain/index.php
    • > /wp-content/plugins/open-brain/api.inc.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: openai, chatgpt, content creator, ai

open-brain/index.php 92% from 13 tests

The main file in "OPEN-BRAIN" v. 0.5.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("open-brain.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin853 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP21016595
JavaScript118170
CSS15047
Markdown126032
SVG3009

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity35.00
▷ Minimum class complexity35.00
▷ Maximum class complexity35.00
Average method complexity3.43
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods214.29%
▷ Public methods1392.86%
▷ Protected methods00.00%
▷ Private methods17.14%
Functions4
▷ Named functions4100.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
There are no PNG files in this plugin