84% airbrake

Code Review | Airbrake

WordPress plugin Airbrake scored84%from 54 tests.

About plugin

  • Plugin page: airbrake
  • Plugin version: 0.2.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2
  • WordPress version: 6.3.1
  • First release: Mar 12, 2013
  • Latest release: Oct 11, 2019
  • Number of updates: 12
  • Update frequency: every 200.3 days
  • Top authors: airbrake (58.33%)benarent (50%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /4,055 total downloads


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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼2.69ms] Passed 4 tests

This is a short check of server-side resources used by Airbrake
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.92 ▼0.44
Dashboard /wp-admin3.31 ▼0.0348.64 ▼10.96
Posts /wp-admin/edit.php3.36 ▲0.0150.38 ▲6.82
Add New Post /wp-admin/post-new.php5.89 ▲0.01107.57 ▲6.55
Media Library /wp-admin/upload.php3.24 ▲0.0135.57 ▼5.89

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 113 new files
Database: no new tables, 9 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Airbrake
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲9513.33 ▼1.071.82 ▲0.1942.06 ▲0.91
Dashboard /wp-admin2,222 ▲334.87 ▼1.06106.88 ▼4.1245.24 ▲3.42
Posts /wp-admin/edit.php2,102 ▲132.05 ▲0.0139.76 ▼0.9235.39 ▼4.51
Add New Post /wp-admin/post-new.php1,560 ▲3818.10 ▼5.16619.58 ▼23.5561.37 ▲0.69
Media Library /wp-admin/upload.php1,407 ▲194.21 ▼0.1199.08 ▲1.8944.13 ▲1.87

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 49× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Airbrake\\Errors\\Base' not found in wp-content/plugins/airbrake/vendor/airbrake/phpbrake/src/Errors/Warning.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/airbrake/vendor/guzzlehttp/promises/src/CancellationException.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/airbrake/vendor/guzzlehttp/promises/src/Coroutine.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/airbrake/vendor/guzzlehttp/psr7/src/FnStream.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/airbrake/vendor/guzzlehttp/psr7/src/CachingStream.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/airbrake/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UriInterface' not found in wp-content/plugins/airbrake/vendor/guzzlehttp/psr7/src/Uri.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Cookie\\CookieJarInterface' not found in wp-content/plugins/airbrake/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Airbrake\\Errors\\Base' not found in wp-content/plugins/airbrake/vendor/airbrake/phpbrake/src/Errors/Notice.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/airbrake/vendor/guzzlehttp/guzzle/src/Exception/TransferException.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: crash, warning, errors, exceptions

airbrake/airbrake-wordpress.php 92% from 13 tests

The primary PHP file in "Airbrake" version 0.2.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("airbrake.php" instead of "airbrake-wordpress.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin8,794 lines of code in 106 files:
LanguageFilesBlank linesComment linesLines of code

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.45
Average class complexity13.16
▷ Minimum class complexity1.00
▷ Maximum class complexity81.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes75100.00%
▷ Final classes810.67%
▷ Static methods7310.66%
▷ Public methods55480.88%
▷ Protected methods162.34%
▷ Private methods11516.79%
▷ Named functions6039.22%
▷ Anonymous functions9360.78%
▷ Global constants610.71%
▷ Class constants5089.29%
▷ Public constants50100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.12MB with 0.05MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png12.23KB5.16KB▼ 57.79%
assets/icon-128x128.png5.08KB2.65KB▼ 47.84%
plugin/images/icon.png1.44KB1.38KB▼ 4.47%
assets/ab-wp.png105.11KB38.80KB▼ 63.09%