72% getsentry-client

Code Review | WordPress Sentry Client

WordPress plugin WordPress Sentry Client scored72%from 54 tests.

About plugin

  • Plugin page: getsentry-client
  • Plugin version: 1...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Feb 24, 2015
  • Latest release: May 16, 2016
  • Number of updates: 43
  • Update frequency: every 10.5 days
  • Top authors: rmb185 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,762 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼5.20ms] Passed 4 tests

Analyzing server-side resources used by WordPress Sentry Client
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.1949.76 ▲2.67
Dashboard /wp-admin3.76 ▲0.2049.70 ▼10.19
Posts /wp-admin/edit.php3.81 ▲0.1354.47 ▼1.97
Add New Post /wp-admin/post-new.php6.28 ▲0.1395.36 ▼11.32
Media Library /wp-admin/upload.php3.62 ▲0.1342.82 ▲3.13
Sentry /wp-admin/options-general.php?page=sentrysettings3.5837.99

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WordPress Sentry Client
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.37 ▲0.131.83 ▼0.0444.48 ▼0.39
Dashboard /wp-admin2,202 ▲285.64 ▲0.0292.87 ▼2.7343.18 ▼5.58
Posts /wp-admin/edit.php2,104 ▲12.04 ▲0.0141.47 ▼4.7336.38 ▲0.91
Add New Post /wp-admin/post-new.php1,557 ▲1218.42 ▼4.72643.08 ▲0.8653.80 ▼1.61
Media Library /wp-admin/upload.php1,407 ▲44.23 ▼0.0398.69 ▼6.7742.63 ▼1.97
Sentry /wp-admin/options-general.php?page=sentrysettings8712.0523.9027.46

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=sentrysettings
    • > Notice in wp-content/plugins/getsentry-client/optionspage.html.php+24
    Trying to access array offset on value of type bool

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/getsentry-client/optionspage.html.php
    • > /wp-content/plugins/getsentry-client/raven/test/Raven/Tests/resources/a.php
  • 15× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Raven_Processor' not found in wp-content/plugins/getsentry-client/raven/lib/Raven/SanitizeDataProcessor.php:8
    • > PHP Warning
      include_once(/tmp/a.php): failed to open stream: No such file or directory in wp-content/plugins/getsentry-client/raven/test/Raven/Tests/resources/b.php on line 3
    • > PHP Warning
      include_once(): Failed opening '/tmp/a.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/getsentry-client/raven/test/Raven/Tests/resources/b.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Raven_Client' not found in wp-content/plugins/getsentry-client/raven/test/Raven/Tests/ClientTest.php:12
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/getsentry-client/optionspage.html.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/getsentry-client/raven/test/Raven/Tests/SerializerTest.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/getsentry-client/raven/test/Raven/Tests/ErrorHandlerTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/getsentry-client/raven/test/Raven/Tests/SanitizeDataProcessorTest.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/getsentry-client/wordpress-sentry.php:67
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/getsentry-client/optionspage.html.php on line 13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === getsentry-client === )
Please take inspiration from this readme.txt

getsentry-client/wordpress-sentry.php 85% from 13 tests

Analyzing the main PHP file in "WordPress Sentry Client" version 1...
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("getsentry-client.php" instead of "wordpress-sentry.php")
  • Version: The version number should only use digits and periods (ex. "1.0.3" instead of "1...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin2,956 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP255236082,760
reStructuredText110464105
JSON20050
XML12023
make16015
Markdown1103

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity12.52
▷ Minimum class complexity1.00
▷ Maximum class complexity132.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes23
▷ Abstract classes14.35%
▷ Concrete classes2295.65%
▷ Final classes00.00%
Methods188
▷ Static methods1910.11%
▷ Public methods16386.70%
▷ Protected methods115.85%
▷ Private methods147.45%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants214.29%
▷ Class constants1285.71%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected