83% cheq-essentials-go-to-market-security

Code Review | CHEQ Essentials

WordPress plugin CHEQ Essentials scored83%from 54 tests.

About plugin

  • Plugin page: cheq-essentials-g...
  • Plugin version: 1.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4.1
  • WordPress version: 6.3.1
  • First release: Apr 30, 2023
  • Latest release: Nov 27, 2023
  • Number of updates: 19
  • Update frequency: every 11.4 days
  • Top authors: barpachuk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /856 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▼6.56ms] Passed 4 tests

Server-side resources used by CHEQ Essentials
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2437.40 ▼0.99
Dashboard /wp-admin3.58 ▲0.2449.24 ▼11.15
Posts /wp-admin/edit.php3.63 ▲0.2848.54 ▲1.55
Add New Post /wp-admin/post-new.php6.10 ▲0.2192.61 ▼6.96
Media Library /wp-admin/upload.php3.44 ▲0.2134.89 ▼7.13

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 9 new options
New WordPress options
cheq-essential-monitoring-date
db_upgraded
theysaidso_admin_options
widget_recent-posts
cc_send_plugin_state
can_compress_scripts
cc_send_plugin_latest_version
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for CHEQ Essentials
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲6914.25 ▼0.461.99 ▲0.3540.58 ▲1.30
Dashboard /wp-admin2,211 ▲375.62 ▲0.0194.80 ▼3.6441.14 ▼6.85
Posts /wp-admin/edit.php2,119 ▲191.96 ▲0.0244.20 ▲3.4135.61 ▼0.55
Add New Post /wp-admin/post-new.php1,539 ▲1323.00 ▼0.02585.49 ▼75.0057.60 ▲10.33
Media Library /wp-admin/upload.php1,419 ▲194.23 ▲0.0295.58 ▼14.7642.98 ▼5.30

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
  • This plugin does not fully uninstall, leaving 9 options in the database
    • cheq-essential-monitoring-date
    • cc_send_plugin_latest_version
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • cc_send_plugin_state
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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 take a closer look at the following
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'CHEGTMS_PLUGIN_PATHclasses/enums.php' (include_path='.:/usr/share/php') in wp-content/plugins/cheq-essentials-go-to-market-security/classes/rtiService.php on line 2
    • > PHP Warning
      Use of undefined constant CHEGTMS_PLUGIN_PATH - assumed 'CHEGTMS_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/cheq-essentials-go-to-market-security/classes/formService.php on line 39
    • > PHP Fatal error
      require_once(): Failed opening required 'CHEGTMS_PLUGIN_PATH/classes/enums.php' (include_path='.:/usr/share/php') in wp-content/plugins/cheq-essentials-go-to-market-security/classes/logService.php on line 73
    • > PHP Warning
      Use of undefined constant CHEGTMS_PLUGIN_PATH - assumed 'CHEGTMS_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/cheq-essentials-go-to-market-security/classes/logService.php on line 73
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cheq-essentials-go-to-market-security/classes/routes.php:12
    • > PHP Warning
      require_once(CHEGTMS_PLUGIN_PATHclasses/enums.php): failed to open stream: No such file or directory in wp-content/plugins/cheq-essentials-go-to-market-security/classes/rtiService.php on line 2
    • > PHP Warning
      Use of undefined constant CHEGTMS_PLUGIN_PATH - assumed 'CHEGTMS_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/cheq-essentials-go-to-market-security/classes/rtiService.php on line 2
    • > PHP Warning
      require_once(CHEGTMS_PLUGIN_PATH/classes/enums.php): failed to open stream: No such file or directory in wp-content/plugins/cheq-essentials-go-to-market-security/classes/logService.php on line 73
    • > PHP Warning
      require_once(CHEGTMS_PLUGIN_PATH/classes/logService.php): failed to open stream: No such file or directory in wp-content/plugins/cheq-essentials-go-to-market-security/classes/formService.php on line 39
    • > PHP Fatal error
      require_once(): Failed opening required 'CHEGTMS_PLUGIN_PATH/classes/logService.php' (include_path='.:/usr/share/php') in wp-content/plugins/cheq-essentials-go-to-market-security/classes/formService.php on line 39

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Contributors: The plugin contributors field is not present
The official readme.txt is a good inspiration

cheq-essentials-go-to-market-security/cheq-essential.php 77% from 13 tests

The main PHP file in "CHEQ Essentials" ver. 1.6 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Requires PHP: Required version does not match the one declared in readme.txt ("5.4" instead of "5.6")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cheq-essentials-go-to-market-security.php" instead of "cheq-essential.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("5.4" instead of "5.6")

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
No dangerous file extensions were detected1,385 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP8119521,286
JavaScript37562
HTML232021
JSON10013
CSS3033

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity11.43
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity3.32
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes750.00%
▷ Concrete classes750.00%
▷ Final classes00.00%
Methods63
▷ Static methods1828.57%
▷ Public methods5079.37%
▷ Protected methods00.00%
▷ Private methods1320.63%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants70
▷ Global constants34.29%
▷ Class constants6795.71%
▷ Public constants67100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/assets/img/Logo_Login.png47.15KB15.87KB▼ 66.33%
includes/assets/img/logo.png44.30KB37.89KB▼ 14.47%