84% ads-invalid-click-protection

Code Review | Ads Invalid Click Protection

WordPress plugin Ads Invalid Click Protection scored84%from 54 tests.

About plugin

  • Plugin page: ads-invalid-click...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.4
  • WordPress version: 6.3.1
  • First release: Jul 14, 2020
  • Latest release: Jul 3, 2021
  • Number of updates: 4
  • Update frequency: every 88.8 days
  • Top authors: ayoubkiass (100%)

Code review

54 tests

User reviews

1 review

Install metrics

4,000+ active /21,662 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.43ms] Passed 4 tests

A check of server-side resources used by Ads Invalid Click Protection
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.48 ▲1.32
Dashboard /wp-admin3.34 ▼0.0056.13 ▼7.60
Posts /wp-admin/edit.php3.39 ▲0.0452.97 ▲1.52
Add New Post /wp-admin/post-new.php5.92 ▲0.0492.64 ▼23.08
Media Library /wp-admin/upload.php3.26 ▲0.0436.07 ▼0.36
Ads Invalid Click Protection /wp-admin/options-general.php?page=Ads_invalid_click_protection3.2336.86

Server storage [IO: ▲25.63MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
These are issues you should consider
  • Total filesystem usage must be limited to 25MB (currently using 25.63MB)
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ads Invalid Click Protection
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,877 ▲9113.36 ▼0.939.74 ▲7.4240.16 ▼4.29
Dashboard /wp-admin2,202 ▲255.62 ▼0.0190.22 ▼1.9742.68 ▼2.58
Posts /wp-admin/edit.php2,104 ▲41.99 ▼0.0439.25 ▼0.9436.07 ▼0.97
Add New Post /wp-admin/post-new.php1,531 ▲523.11 ▼0.34729.13 ▲42.0254.56 ▼2.43
Media Library /wp-admin/upload.php1,398 ▼24.26 ▲0.1398.83 ▼12.6241.51 ▼5.70
Ads Invalid Click Protection /wp-admin/options-general.php?page=Ads_invalid_click_protection1,1932.1730.4572.37

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ads-invalid-click-protection/ads-invalid-click-protection.php

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 96% from 29 tests

readme.txt Passed 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
6 plugin tags: aicpess, adsense, invalid click, impactpixel, save adsense account...

ads-invalid-click-protection/ads-invalid-click-protection.php 92% from 13 tests

The main file in "Ads Invalid Click Protection" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 180 characters long)

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 plugin483 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS2289202
PHP21775141
JavaScript2100104
Markdown117036

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin