74% country-caching-extension

Code Review | Country Caching Extension

WordPress plugin Country Caching Extension scored74%from 54 tests.

About plugin

  • Plugin page: country-caching-e...
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.9.6
  • WordPress version: 6.3.1
  • First release: Jan 4, 2015
  • Latest release: Mar 24, 2021
  • Number of updates: 45
  • Update frequency: every 50.9 days
  • Top authors: wrigs1 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

20+ active /2,865 total downloads

Benchmarks

Plugin footprint 65% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼11.48ms] Passed 4 tests

A check of server-side resources used by Country Caching Extension
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0045.13 ▼4.92
Dashboard /wp-admin3.32 ▼0.0252.09 ▼13.05
Posts /wp-admin/edit.php3.37 ▲0.0251.98 ▼2.15
Add New Post /wp-admin/post-new.php5.90 ▲0.0288.94 ▼25.80
Media Library /wp-admin/upload.php3.25 ▲0.0240.73 ▲3.02

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
CCZC_VERSION
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
cczc_caching_options

Browser metrics Passed 4 tests

A check of browser resources used by Country Caching Extension
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.51 ▼0.032.16 ▲0.4544.18 ▲4.41
Dashboard /wp-admin2,214 ▲435.55 ▼0.1185.59 ▼5.9140.80 ▼5.82
Posts /wp-admin/edit.php2,116 ▲162.03 ▲0.0135.55 ▼4.4033.66 ▼3.59
Add New Post /wp-admin/post-new.php1,539 ▲1123.13 ▼0.17701.43 ▲13.8048.53 ▼2.76
Media Library /wp-admin/upload.php1,419 ▲224.21 ▲0.0397.57 ▼13.5545.26 ▼2.45

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/country-caching-extension/inc/cczc_settings_form.php+104
    unlink(wp-content/ac-plugins/cca_qc_geoip_plugin.php): No such file or directory
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | 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 items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/country-caching-extension/caching_plugins/cca_qc_geoip_plugin.php

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 issues were found

Optimizations

Plugin configuration 96% 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
9 plugin tags: geo-location, location, cache, caching, geoip...

country-caching-extension/country_cache_zen.php 92% from 13 tests

This is the main PHP file of "Country Caching Extension" version 1.2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("country-caching-extension.php" instead of "country_cache_zen.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
Everything looks great! No dangerous files found in this plugin2,446 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP112752261,490
Pascal41454,698919
CSS16037

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity39.86
▷ Minimum class complexity1.00
▷ Maximum class complexity167.00
Average method complexity5.61
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods59
▷ Static methods11.69%
▷ Public methods3152.54%
▷ Protected methods610.17%
▷ Private methods2237.29%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants17100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin