10% aa-block-country

Code Review | AA Block country

WordPress plugin AA Block country scored 10% from 54 tests.

About plugin

  • Plugin page: aa-block-country
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.0
  • WordPress version: 5.9.2
  • First release: Nov 8, 2014
  • Latest release: Nov 17, 2014
  • Number of updates: 5
  • Update frequency: every 1.8 days
  • Top authors: aaextention (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,245 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/aa-block-country/aablockcountry.php+18
    Undefined index: HTTP_CLIENT_IP

Server metrics [RAM: ▼2.50MB] [CPU: ▼344.37ms] Passed 4 tests

A check of server-side resources used by AA Block country
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.87 ▼1.653.90 ▼46.27
Dashboard /wp-admin1.89 ▼1.524.43 ▼29.05
Posts /wp-admin/edit.php1.89 ▼1.753.82 ▼37.65
Add New Post /wp-admin/post-new.php1.89 ▼5.083.88 ▼1,264.52
Media Library /wp-admin/upload.php1.89 ▼1.423.95 ▼27.03

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for AA Block country
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,815 ▲7016.16 ▲0.416.12 ▲0.012.98 ▲0.71
Dashboard /wp-admin2,912 ▲546.13 ▼0.06118.93 ▼18.63158.74 ▼4.49
Posts /wp-admin/edit.php2,708 ▲143.37 ▲0.1263.54 ▲1.09143.22 ▼1.34
Add New Post /wp-admin/post-new.php1,786 ▲12520.62 ▲4.38447.81 ▼2.74157.92 ▼1.31
Media Library /wp-admin/upload.php1,712 ▲145.47 ▼0.07142.70 ▲0.13190.22 ▲0.87

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/aa-block-country/aablockcountry.php+18
    Undefined index: HTTP_CLIENT_IP

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/aa-block-country/aablockcountry.php:48
    • > PHP Notice
      Undefined property: stdClass::$countryCode in wp-content/plugins/aa-block-country/aablockcountry.php on line 45

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: extension, visitors, ip, aaextension, block...

aa-block-country/aablockcountry.php 92% from 13 tests

The entry point to "AA Block country" version 1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("aa-block-country.php" instead of "aablockcountry.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected50 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1551450

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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
There were not PNG files found in your plugin