84% wp-sentry-integration

Code Review | WordPress Sentry

WordPress plugin WordPress Sentry scored84%from 54 tests.

About plugin

  • Plugin page: wp-sentry-integra...
  • Plugin version: 7.1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.4
  • WordPress version: 6.3.1
  • First release: Oct 27, 2016
  • Latest release: Nov 13, 2023
  • Number of updates: 358
  • Update frequency: every 7.2 days
  • Top authors: stayallive (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

9,000+ active /423,142 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.28MB] [CPU: ▼7.91ms] Passed 4 tests

An overview of server-side resources used by WordPress Sentry
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2736.58 ▼4.82
Dashboard /wp-admin3.64 ▲0.2948.48 ▼17.19
Posts /wp-admin/edit.php3.70 ▲0.3348.38 ▲2.57
Add New Post /wp-admin/post-new.php6.16 ▲0.2781.20 ▼12.21
Media Library /wp-admin/upload.php3.50 ▲0.2735.28 ▲3.16
Sentry /wp-admin/tools.php?page=wp-sentry3.8334.19

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 309 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

WordPress Sentry: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3214.70 ▲0.311.65 ▼0.4339.63 ▼1.88
Dashboard /wp-admin2,202 ▲255.62 ▲0.0992.51 ▼12.7840.73 ▼5.69
Posts /wp-admin/edit.php2,101 ▲42.01 ▲0.0139.87 ▲5.4036.78 ▼1.29
Add New Post /wp-admin/post-new.php1,529 ▲322.89 ▼0.07674.18 ▲30.4763.14 ▲7.26
Media Library /wp-admin/upload.php1,407 ▲74.17 ▼0.1097.33 ▼0.8145.35 ▲1.82
Sentry /wp-admin/tools.php?page=wp-sentry1,1342.0327.4334.21

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

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
Please fix the following items
  • 176× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WPSentry\\ScopedVendor\\Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-sentry-integration/build/vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Stringable' not found in wp-content/plugins/wp-sentry-integration/build/vendor/sentry/sentry/src/Severity.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WPSentry\\ScopedVendor\\Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-sentry-integration/build/vendor/composer/installers/src/Composer/Installers/TheliaInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPSentry\\ScopedVendor\\Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-sentry-integration/build/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPSentry\\ScopedVendor\\Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-sentry-integration/build/vendor/composer/installers/src/Composer/Installers/AkauntingInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPSentry\\ScopedVendor\\Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-sentry-integration/build/vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPSentry\\ScopedVendor\\Symfony\\Component\\OptionsResolver\\Exception\\InvalidArgumentException' not found in wp-content/plugins/wp-sentry-integration/build/vendor/symfony/options-resolver/Exception/MissingOptionsException.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'WPSentry\\ScopedVendor\\Symfony\\Component\\OptionsResolver\\Exception\\ExceptionInterface' not found in wp-content/plugins/wp-sentry-integration/build/vendor/symfony/options-resolver/Exception/NoSuchOptionException.php:23
    • > PHP Fatal error
      Uncaught Error: Interface 'WPSentry\\ScopedVendor\\Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/wp-sentry-integration/build/vendor/guzzlehttp/psr7/src/AppendStream.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WPSentry\\ScopedVendor\\Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-sentry-integration/build/vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: error-handler, sentry, log, logging, error-monitoring

wp-sentry-integration/wp-sentry.php 92% from 13 tests

The principal PHP file in "WordPress Sentry" v. 7.1.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-sentry-integration.php" instead of "wp-sentry.php")

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
There were no executable files found in this plugin15,971 lines of code in 300 files:
LanguageFilesBlank linesComment linesLines of code
PHP2888779,65014,621
JSON300884
JavaScript77627447
Bourne Shell16018
YAML1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity8.18
▷ Minimum class complexity1.00
▷ Maximum class complexity125.00
Average method complexity2.37
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces28
Interfaces23
Traits10
Classes242
▷ Abstract classes52.07%
▷ Concrete classes23797.93%
▷ Final classes8535.86%
Methods1,439
▷ Static methods19513.55%
▷ Public methods1,20783.88%
▷ Protected methods664.59%
▷ Private methods16611.54%
Functions109
▷ Named functions5146.79%
▷ Anonymous functions5853.21%
Constants102
▷ Global constants76.86%
▷ Class constants9593.14%
▷ Public constants7174.74%

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