10% aa-block-country-with-redirect

Code Review | AA Block country with redirect

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

About plugin

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

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,109 total downloads


Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/aa-block-country-with-redirect/aablockcountrywithredirect.php+17
    Undefined index: HTTP_CLIENT_IP

Server metrics [RAM: ▼1.86MB] [CPU: ▼193.18ms] Passed 4 tests

An overview of server-side resources used by AA Block country with redirect
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /1.77 ▼1.064.83 ▼30.59
Dashboard /wp-admin1.79 ▼1.275.41 ▼42.46
Posts /wp-admin/edit.php1.79 ▼1.325.72 ▼41.35
Add New Post /wp-admin/post-new.php1.79 ▼3.644.84 ▼652.43
Media Library /wp-admin/upload.php1.79 ▼1.224.97 ▼36.46

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for AA Block country with redirect
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,699 ▲10415.84 ▲0.2310.24 ▼5.4547.26 ▼1.45
Dashboard /wp-admin2,993 ▲595.94 ▲0.02126.36 ▼23.20107.63 ▼4.27
Posts /wp-admin/edit.php2,759 ▲232.71 ▼0.1277.28 ▲11.0988.17 ▼8.92
Add New Post /wp-admin/post-new.php1,685 ▲217.22 ▼1.53410.81 ▲32.70100.39 ▼13.33
Media Library /wp-admin/upload.php1,830 ▲235.01 ▼0.04145.07 ▼10.10121.72 ▼1.83

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
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/aa-block-country-with-redirect/aablockcountrywithredirect.php+17
    Undefined index: HTTP_CLIENT_IP

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined property: stdClass::$countryCode in wp-content/plugins/aa-block-country-with-redirect/aablockcountrywithredirect.php on line 45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/aa-block-country-with-redirect/aablockcountrywithredirect.php:47

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: aaextention, ip, redirect, block country, aa extension...

aa-block-country-with-redirect/aablockcountrywithredirect.php 92% from 13 tests

The primary PHP file in "AA Block country with redirect" version 1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("aa-block-country-with-redirect.php" instead of "aablockcountrywithredirect.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
Good job! No executable or dangerous file extensions detected54 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.12
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions4100.00%
▷ Anonymous functions00.00%
▷ 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