68% cc-sentry

Code Review | CC-Sentry

WordPress plugin CC-Sentry scored68%from 54 tests.

About plugin

  • Plugin page: cc-sentry
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.2-4.8.2
  • WordPress version: 6.3.1
  • First release: Sep 26, 2017
  • Latest release: Sep 26, 2017
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: ClearcodeHQ (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,283 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▼1.33ms] Passed 4 tests

Server-side resources used by CC-Sentry
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2045.46 ▲2.04
Dashboard /wp-admin3.56 ▲0.2650.07 ▼5.75
Posts /wp-admin/edit.php3.61 ▲0.2652.15 ▲1.54
Add New Post /wp-admin/post-new.php6.08 ▲0.2099.58 ▼2.32
Media Library /wp-admin/upload.php3.42 ▲0.2040.25 ▲1.20
Sentry /wp-admin/options-general.php?page=cc-sentry3.4236.37

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 67 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
Clearcode\Sentry
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for CC-Sentry
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.35 ▲0.001.81 ▲0.0541.46 ▼4.61
Dashboard /wp-admin2,198 ▲215.55 ▼0.1182.00 ▼16.2238.50 ▼6.33
Posts /wp-admin/edit.php2,109 ▲91.99 ▼0.0442.83 ▲3.2035.62 ▲2.09
Add New Post /wp-admin/post-new.php1,531 ▲323.03 ▼0.08649.85 ▼29.3853.07 ▼5.50
Media Library /wp-admin/upload.php1,409 ▲124.36 ▲0.1397.71 ▼5.7544.79 ▼1.79
Sentry /wp-admin/options-general.php?page=cc-sentry9272.0330.2526.31

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/cc-sentry/vendor/raven/raven/test/Raven/Tests/resources/a.php
  • 10× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/cc-sentry/vendor/raven/raven/test/Raven/Tests/SanitizeDataProcessorTest.php:12
    • > PHP Warning
      include_once(): Failed opening '/tmp/a.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/cc-sentry/vendor/raven/raven/test/Raven/Tests/resources/b.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Raven_Processor' not found in wp-content/plugins/cc-sentry/vendor/raven/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/cc-sentry/vendor/raven/raven/test/Raven/Tests/resources/b.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/cc-sentry/vendor/raven/raven/test/Raven/Tests/CompatTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/cc-sentry/vendor/raven/raven/test/Raven/Tests/UtilTest.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Raven_Client' not found in wp-content/plugins/cc-sentry/vendor/raven/raven/test/Raven/Tests/ClientTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/cc-sentry/vendor/raven/raven/test/Raven/Tests/ErrorHandlerTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/cc-sentry/vendor/raven/raven/test/Raven/Tests/StacktraceTest.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/cc-sentry/vendor/raven/raven/test/Raven/Tests/SerializerTest.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (**CC-Sentry Settings** - Visit the 'Settings > Sentry' page, select your preferred options and save them.) image required
The official readme.txt might help

cc-sentry/plugin.php 92% from 13 tests

This is the main PHP file of "CC-Sentry" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("cc-sentry.php" instead of "plugin.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
These items require your attention
  • For security reasons, never distribute binary or executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/cc-sentry/vendor/bin/raven.bat
3,285 lines of code in 50 files:
LanguageFilesBlank linesComment linesLines of code
PHP375967662,979
reStructuredText110464105
JSON30098
PO File17732
XML12023
YAML17023
make15012
Bourne Shell1007
CSS1003
DOS Batch1003
HTML2020

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity12.78
▷ Minimum class complexity1.00
▷ Maximum class complexity118.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes27
▷ Abstract classes27.41%
▷ Concrete classes2592.59%
▷ Final classes00.00%
Methods208
▷ Static methods2612.50%
▷ Public methods17885.58%
▷ Protected methods146.73%
▷ Private methods167.69%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants14
▷ Global constants214.29%
▷ Class constants1285.71%
▷ Public constants12100.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
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png58.07KB21.30KB▼ 63.32%