89% category-country-aware

Code Review | Category Country Aware Wordpress

WordPress plugin Category Country Aware Wordpress scored 89% from 54 tests.

About plugin

  • Plugin page: category-country-...
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.9.6
  • WordPress version: 6.3.1
  • First release: Nov 18, 2014
  • Latest release: Mar 24, 2021
  • Number of updates: 50
  • Update frequency: every 46.4 days
  • Top authors: wrigs1 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

400+ active / 7,762 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.47MB] [CPU: ▲3.81ms] Passed 4 tests

A check of server-side resources used by Category Country Aware Wordpress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3345.73 ▲2.62
Dashboard /wp-admin3.87 ▲0.5656.82 ▲5.94
Posts /wp-admin/edit.php3.92 ▲0.5650.37 ▲1.82
Add New Post /wp-admin/post-new.php6.39 ▲0.5098.91 ▲5.02
Media Library /wp-admin/upload.php3.73 ▲0.5041.51 ▲5.79
Category Country Aware goodies /wp-admin/options-general.php?page=cca-sitewide-settings3.6942.60

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Category Country Aware Wordpress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲7513.46 ▼0.802.15 ▲0.1746.56 ▼11.28
Dashboard /wp-admin2,216 ▲285.86 ▼0.08113.07 ▼15.3344.19 ▼4.30
Posts /wp-admin/edit.php2,104 ▲182.06 ▲0.0140.64 ▲2.0935.48 ▼3.79
Add New Post /wp-admin/post-new.php1,547 ▲1323.31 ▲0.33634.05 ▼27.5058.25 ▼0.22
Media Library /wp-admin/upload.php1,398 ▲104.24 ▲0.09104.48 ▼4.5348.82 ▲1.38
Category Country Aware goodies /wp-admin/options-general.php?page=cca-sitewide-settings9042.2043.5653.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_ccatextwid
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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)
No browser errors were detected


Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
  • Requires php: Version not formatted correctly
The official readme.txt is a good inspiration

category-country-aware/cca_init.php 92% from 13 tests

This is the main PHP file of "Category Country Aware Wordpress" version 1.2.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("category-country-aware.php" instead of "cca_init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin3,256 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity48.89
▷ Minimum class complexity1.00
▷ Maximum class complexity163.00
Average method complexity6.75
▷ Minimum method complexity1.00
▷ Maximum method complexity54.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
▷ Static methods1418.67%
▷ Public methods4762.67%
▷ Protected methods68.00%
▷ Private methods2229.33%
▷ Named functions31100.00%
▷ Anonymous functions00.00%
▷ Global constants13100.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