84% clickcease-click-fraud-protection

Code Review | ClickCease Click Fraud Protection

WordPress plugin ClickCease Click Fraud Protection scored84%from 54 tests.

About plugin

  • Plugin page: clickcease-click-...
  • Plugin version: 3.2.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4.1
  • WordPress version: 6.3.1
  • First release: Feb 10, 2019
  • Latest release: Nov 15, 2023
  • Number of updates: 83
  • Update frequency: every 21.1 days
  • Top authors: barpachuk (85.54%)yuvalhaimov (15.66%)

Code review

54 tests

User reviews

7 reviews

Install metrics

10,000+ active /154,280 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
Install script ran successfully

Server metrics [RAM: ▲0.23MB] [CPU: ▼1.38ms] Passed 4 tests

Analyzing server-side resources used by ClickCease Click Fraud Protection
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2342.72 ▲0.66
Dashboard /wp-admin3.58 ▲0.2747.83 ▼2.36
Posts /wp-admin/edit.php3.63 ▲0.2750.37 ▲3.90
Add New Post /wp-admin/post-new.php6.10 ▲0.2085.38 ▼7.72
Media Library /wp-admin/upload.php3.44 ▲0.2040.58 ▲4.93

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
cc_send_plugin_state
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
cc_send_plugin_latest_version
db_upgraded
cc-monitoring-date
widget_recent-comments

Browser metrics Passed 4 tests

ClickCease Click Fraud Protection: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4414.72 ▲0.371.74 ▼0.1044.37 ▼4.31
Dashboard /wp-admin2,208 ▲345.51 ▼0.1391.82 ▼10.0340.95 ▼2.26
Posts /wp-admin/edit.php2,116 ▲161.96 ▲0.0140.75 ▲2.9936.30 ▲2.65
Add New Post /wp-admin/post-new.php1,539 ▲1323.19 ▲0.11665.68 ▲16.7352.69 ▲2.13
Media Library /wp-admin/upload.php1,410 ▲164.17 ▼0.0298.40 ▼1.4742.39 ▲0.22

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 9 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • cc_send_plugin_latest_version
    • widget_recent-posts
    • cc_send_plugin_state
    • cc-monitoring-date

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant clickcease_plugin_PLUGIN_PATH - assumed 'clickcease_plugin_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/clickcease-click-fraud-protection/classes/rtiService.php on line 2
    • > PHP Warning
      require_once(clickcease_plugin_PLUGIN_PATH/classes/enums.php): failed to open stream: No such file or directory in wp-content/plugins/clickcease-click-fraud-protection/classes/logService.php on line 73
    • > PHP Fatal error
      require_once(): Failed opening required 'clickcease_plugin_PLUGIN_PATH/classes/logService.php' (include_path='.:/usr/share/php') in wp-content/plugins/clickcease-click-fraud-protection/classes/formService.php on line 51
    • > PHP Warning
      Use of undefined constant clickcease_plugin_PLUGIN_PATH - assumed 'clickcease_plugin_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/clickcease-click-fraud-protection/classes/formService.php on line 51
    • > PHP Fatal error
      require_once(): Failed opening required 'clickcease_plugin_PLUGIN_PATHclasses/enums.php' (include_path='.:/usr/share/php') in wp-content/plugins/clickcease-click-fraud-protection/classes/rtiService.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/clickcease-click-fraud-protection/classes/routes.php:12
    • > PHP Warning
      Use of undefined constant clickcease_plugin_PLUGIN_PATH - assumed 'clickcease_plugin_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/clickcease-click-fraud-protection/classes/logService.php on line 73
    • > PHP Warning
      require_once(clickcease_plugin_PLUGIN_PATHclasses/enums.php): failed to open stream: No such file or directory in wp-content/plugins/clickcease-click-fraud-protection/classes/rtiService.php on line 2
    • > PHP Warning
      require_once(clickcease_plugin_PLUGIN_PATH/classes/logService.php): failed to open stream: No such file or directory in wp-content/plugins/clickcease-click-fraud-protection/classes/formService.php on line 51
    • > PHP Fatal error
      require_once(): Failed opening required 'clickcease_plugin_PLUGIN_PATH/classes/enums.php' (include_path='.:/usr/share/php') in wp-content/plugins/clickcease-click-fraud-protection/classes/logService.php on line 73

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Contributors: Contributors not specified
You can look at the official readme.txt

clickcease-click-fraud-protection/clickcease.php 92% from 13 tests

The entry point to "ClickCease Click Fraud Protection" version 3.2.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("clickcease-click-fraud-protection.php" instead of "clickcease.php")

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
Success! There were no dangerous files found in this plugin1,208 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP7123511,052
JavaScript27361
Markdown132060
HTML232021
JSON10013
CSS1011

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity12.75
▷ Minimum class complexity1.00
▷ Maximum class complexity56.00
Average method complexity3.31
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes650.00%
▷ Concrete classes650.00%
▷ Final classes00.00%
Methods61
▷ Static methods1626.23%
▷ Public methods4675.41%
▷ Protected methods00.00%
▷ Private methods1524.59%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants57
▷ Global constants35.26%
▷ Class constants5494.74%
▷ Public constants54100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
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%