84% checkaim-ai-anti-fraud-protection

Code Review | CheckAIM - AI Anti Fraud Protection

WordPress plugin CheckAIM - AI Anti Fraud Protection scored84%from 54 tests.

About plugin

  • Plugin page: checkaim-ai-anti-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.2
  • WordPress version: 6.3.1
  • First release: Jun 5, 2023
  • Latest release: Jun 5, 2023
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: searlco (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /77 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼11.69ms] Passed 4 tests

This is a short check of server-side resources used by CheckAIM - AI Anti Fraud Protection
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0236.24 ▼2.04
Dashboard /wp-admin3.33 ▼0.0245.47 ▼17.46
Posts /wp-admin/edit.php3.38 ▲0.0246.13 ▼3.66
Add New Post /wp-admin/post-new.php5.91 ▲0.0279.48 ▼23.59
Media Library /wp-admin/upload.php3.26 ▲0.0235.72 ▲3.19

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

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

Browser metrics Passed 4 tests

CheckAIM - AI Anti 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,813 ▲2714.32 ▼0.031.63 ▼0.2144.21 ▲2.32
Dashboard /wp-admin2,213 ▲325.53 ▼0.3582.36 ▼18.8537.04 ▼1.80
Posts /wp-admin/edit.php2,125 ▲252.15 ▲0.1433.75 ▼5.9137.05 ▲2.30
Add New Post /wp-admin/post-new.php1,549 ▲2123.17 ▼0.14667.80 ▼11.4152.62 ▼12.09
Media Library /wp-admin/upload.php1,418 ▲184.17 ▼0.1099.12 ▲6.4143.10 ▼1.62

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/checkaim-ai-anti-fraud-protection/admin/checkaim-admin-view.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/checkaim-ai-anti-fraud-protection/admin/checkaim-admin-notices.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/checkaim-ai-anti-fraud-protection/includes/checkaim-track-image.php:42

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: antifraud, anti fraud, anti fraud protection, checkaim

checkaim-ai-anti-fraud-protection/checkaim-wordpress.php 92% from 13 tests

The entry point to "CheckAIM - AI Anti Fraud Protection" version 1.0.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("checkaim-ai-anti-fraud-protection.php" instead of "checkaim-wordpress.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected139 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP41742126
CSS2109
Markdown1304

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected