72% brokebot

Code Review | BrokeBot

WordPress plugin BrokeBot scored72%from 54 tests.

About plugin

  • Plugin page: brokebot
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.3
  • WordPress version: 6.3.1
  • First release: Oct 25, 2019
  • Latest release: Oct 26, 2019
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: joelhatmaker (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /476 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼4.19ms] Passed 4 tests

This is a short check of server-side resources used by BrokeBot
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0724.99 ▼14.25
Dashboard /wp-admin3.40 ▲0.0648.31 ▼9.03
Posts /wp-admin/edit.php3.52 ▲0.1646.54 ▲2.95
Add New Post /wp-admin/post-new.php6.00 ▲0.1297.05 ▲11.87
Media Library /wp-admin/upload.php3.33 ▲0.1035.74 ▲3.57
Brokebot Options /wp-admin/admin.php?page=brokebot-settings3.3631.76
Brokebot Support /wp-admin/admin.php?page=brokebot-support3.2930.55

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 94 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for BrokeBot
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲9413.82 ▼0.531.86 ▲0.0436.70 ▼6.26
Dashboard /wp-admin2,244 ▲555.18 ▲0.19104.46 ▼2.2638.28 ▼0.40
Posts /wp-admin/edit.php2,696 ▲6072.69 ▲0.6969.14 ▲32.2134.98 ▲0.35
Add New Post /wp-admin/post-new.php1,556 ▲2818.41 ▼0.31611.71 ▼18.3457.54 ▼14.71
Media Library /wp-admin/upload.php1,420 ▲354.46 ▲0.2695.07 ▼3.2940.66 ▼2.05
Brokebot Options /wp-admin/admin.php?page=brokebot-settings1,2262.4939.2931.23
Brokebot Support /wp-admin/admin.php?page=brokebot-support8861.9325.0822.99

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=brokebot-settings
    • > Notice in wp-content/plugins/brokebot/admin/partials/brokebot-admin-settings.php+55
    Trying to access array offset on value of type bool
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=brokebot-settings
    • > Warning in wp-content/plugins/brokebot/admin/partials/brokebot-admin-settings.php+175
    in_array() expects parameter 2 to be array, null given

SRP 0% 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
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/brokebot/public/partials/brokebot-public-display.php
    • > /wp-content/plugins/brokebot/admin/partials/brokebot-admin-support.php
    • > /wp-content/plugins/brokebot/admin/partials/brokebot-admin-display.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/brokebot/admin/partials/brokebot-admin-settings.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === brokebot === )
  • Donate link: Invalid URI found ("getbrokebot.com")
The official readme.txt is a good inspiration

brokebot/brokebot.php Passed 13 tests

The main PHP file in "BrokeBot" ver. 1.0.8 adds more information about the plugin and also serves as the entry point for this plugin
74 characters long description:
A simple ActionBot to increase conversions from key pages of your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin11,666 lines of code in 88 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript652,6407619,872
CSS69081,169
PHP14205611536
SVG36289

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity5.14
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods35
▷ Static methods25.71%
▷ Public methods3085.71%
▷ Protected methods00.00%
▷ Private methods514.29%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected