94% aa-ad-by-country

Code Review | AA Ad by country

WordPress plugin AA Ad by country scored 94% from 54 tests.

About plugin

  • Plugin page: aa-ad-by-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: 4
  • Update frequency: every 2.5 days
  • Top authors: aaextention (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 831 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼297.55ms] Passed 4 tests

Analyzing server-side resources used by AA Ad by country
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0153.88 ▲4.11
Dashboard /wp-admin3.42 ▲0.0133.49 ▲1.46
Posts /wp-admin/edit.php3.65 ▲0.0137.94 ▼1.61
Add New Post /wp-admin/post-new.php6.89 ▼0.0891.76 ▼1,188.54
Media Library /wp-admin/upload.php3.30 ▲0.0123.70 ▼1.51

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

How much does this plugin use your filesystem and database?
No storage issues were detected
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 Ad by country
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲4116.22 ▲0.646.08 ▼0.102.18 ▼0.26
Dashboard /wp-admin2,885 ▲316.13 ▼0.01117.82 ▼18.76156.90 ▼2.90
Posts /wp-admin/edit.php2,694 ▲33.24 ▲0.0164.65 ▼2.85142.17 ▲1.77
Add New Post /wp-admin/post-new.php1,661 ▼721.86 ▲3.26408.04 ▲7.97155.57 ▼8.69
Media Library /wp-admin/upload.php1,695 ▲35.56 ▲0.04140.21 ▲3.26197.78 ▲11.09

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/aa-ad-by-country/aadbycountry.php:62

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test


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: aaextention, aaextension, ads, ip, extension...

aa-ad-by-country/aadbycountry.php 92% from 13 tests

"AA Ad by country" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("aa-ad-by-country.php" instead of "aadbycountry.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
Everything looks great! No dangerous files found in this plugin34 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
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 functions2100.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