84% annotation-by-country

Code Review | Annotation By Country

WordPress plugin Annotation By Country scored84%from 54 tests.

About plugin

  • Plugin page: annotation-by-cou...
  • Plugin version: 0.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.7.1
  • WordPress version: 6.3.1
  • First release: Dec 19, 2018
  • Latest release: Oct 23, 2021
  • Number of updates: 5
  • Update frequency: every 207.8 days
  • Top authors: pandanote (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /632 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by Annotation By Country
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0044.99 ▲1.01
Dashboard /wp-admin3.32 ▲0.0247.28 ▼8.64
Posts /wp-admin/edit.php3.37 ▲0.0250.34 ▼0.66
Add New Post /wp-admin/post-new.php5.90 ▲0.0285.28 ▼11.55
Media Library /wp-admin/upload.php3.24 ▲0.0236.65 ▲0.56
Annotation By Country /wp-admin/options-general.php?page=settings_of_annotation_by_country3.2132.45

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Annotation By Country
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.48 ▲0.131.93 ▼0.3944.29 ▼1.98
Dashboard /wp-admin2,213 ▲254.85 ▼1.04101.14 ▼2.7240.91 ▲1.85
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0233.23 ▼1.8236.04 ▲5.38
Add New Post /wp-admin/post-new.php1,545 ▲1222.80 ▼0.38673.01 ▲63.7756.59 ▲3.98
Media Library /wp-admin/upload.php1,395 ▲104.38 ▲0.2599.70 ▼2.1642.77 ▼1.53
Annotation By Country /wp-admin/options-general.php?page=settings_of_annotation_by_country8032.0325.2632.74

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
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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
Even though everything seems fine, this is not an exhaustive test

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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/annotation-by-country/abc.php:196

User-side errors Passed 1 test

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


Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: posts, translation, annotation, plugin, wordpress...

annotation-by-country/abc.php 85% from 13 tests

Analyzing the main PHP file in "Annotation By Country" version 0.2.0
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("annotation-by-country.php" instead of "abc.php")
  • Description: The description should be shorter than 140 characters (currently 250 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin204 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions2100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin